Skip to content

Commit f8bb201

Browse files
authored
Merge pull request #172 from Mdwiki-TD/update_new
Update new
2 parents a7799bc + b18d286 commit f8bb201

28 files changed

+277
-179
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ api_or_sql/old.zip
4343
*.zip
4444
t.php
4545
leaderboard/z.php
46+
47+
/vendor/
48+
composer.lock
49+
/tests_backup
50+
.phpunit.result.cache
51+
phpunit.xml.dist
52+
phpunit.xml.z
53+
run.sh

composer.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "mdwiki/td",
3+
"description": "This tool looks for Wikidata items that have a page on mdwiki.org but not in another wikipedia language",
4+
"autoload": {
5+
"psr-4": {
6+
"TD\\": "src/",
7+
"TD\\Render\\": "src/renders/",
8+
"Actions\\": [
9+
"src/actions/",
10+
"src/td_api_wrap/"
11+
],
12+
"SQLorAPI\\": "src/api_or_sql/",
13+
"Tables\\": "src/Tables/",
14+
"Results\\": "src/results/",
15+
"Leaderboard\\": "src/leaderboard/",
16+
"TranslateMed\\": "src/translate_med/"
17+
},
18+
"files": [
19+
"src/include_all.php"
20+
]
21+
},
22+
"authors": [
23+
{
24+
"name": "Ibrahem",
25+
"email": "[email protected]"
26+
}
27+
],
28+
"autoload-dev": {
29+
"psr-4": {
30+
"MyLibrary\\Tests\\": "tests/"
31+
}
32+
},
33+
"require-dev": {
34+
"phpunit/phpunit": "^11.0"
35+
},
36+
"require": {
37+
"php": "^8.2",
38+
"ext-curl": "*",
39+
"ext-json": "*"
40+
},
41+
"scripts": {
42+
"test": "phpunit"
43+
}
44+
}

phpunit.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.0/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true">
6+
7+
<testsuites>
8+
<testsuite name="ParseWiki Test Suite">
9+
<directory>tests</directory>
10+
</testsuite>
11+
</testsuites>
12+
13+
</phpunit>

src/Tables/sql_tables.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
include_once __DIR__ . '/Tables/sql_tables.php'; // Tables::$s_cat_titles Tables::$s_cat_to_camp Tables::$s_camp_to_cat
1616
*/
1717
//---
18-
include_once __DIR__ . '/../actions/test_print.php';
1918
include_once __DIR__ . '/../actions/load_request.php';
2019
include_once __DIR__ . '/../api_or_sql/index.php';
2120
//---

src/Tables/tables_dir.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
error_reporting(E_ALL);
1414
};
1515

16-
use function Actions\TestPrint\test_print;
16+
use function TD\Render\TestPrint\test_print;
1717

1818
$tables_dir = __DIR__ . '/../../td/Tables';
1919
//---

src/actions/curl_api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use function Actions\CurlApi\post_url_params_result;
88
*/
99

10-
use function Actions\TestPrint\test_print;
10+
use function TD\Render\TestPrint\test_print;
1111

1212
function post_url_params_result(string $endPoint, array $params = []): string
1313
{

src/actions/load_request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
error_reporting(E_ALL);
1313
}
1414

15+
include_once __DIR__ . '/../td_api_wrap/td_api.php';
1516
include_once __DIR__ . '/html.php';
1617
include_once __DIR__ . '/wiki_api.php';
1718
include_once __DIR__ . '/mdwiki_api.php';
18-
include_once __DIR__ . '/td_api.php';
1919
include_once __DIR__ . '/mdwiki_sql.php';
2020
include_once __DIR__ . '/../api_or_sql/index.php';
2121

src/actions/mdwiki_api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use function Actions\MdwikiApi\get_mdwiki_url_with_params;
77
*/
88

9-
use function Actions\TestPrint\test_print;
9+
use function TD\Render\TestPrint\test_print;
1010

1111
function post_url_mdwiki(string $endPoint, array $params = []): string
1212
{

src/api_or_sql/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
use function Actions\MdwikiSql\fetch_query;
1515
use function Actions\TDApi\get_td_api;
16-
use function Actions\TestPrint\test_print;
16+
use function TD\Render\TestPrint\test_print;
1717

1818
$settings_tabe = array_column(get_td_api(['get' => 'settings']), 'value', 'title');
1919
//---

src/header.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@
1818
$GLOBALS['global_username'] = '';
1919
}
2020
//---
21+
include_once __DIR__ . '/renders/include.php';
22+
//---
2123
include_once __DIR__ . '/head.php';
24+
include_once __DIR__ . '/td_api_wrap/td_api.php';
2225
include_once __DIR__ . '/Tables/tables_dir.php';
23-
include_once __DIR__ . '/actions/test_print.php';
2426
include_once __DIR__ . '/actions/mdwiki_sql.php';
2527
include_once __DIR__ . '/actions/html.php';
26-
include_once __DIR__ . '/actions/td_api.php';
2728
include_once __DIR__ . '/api_or_sql/index.php';
2829
//---
2930
use function Actions\Html\banner_alert;

0 commit comments

Comments
 (0)