62 Commits

Author SHA1 Message Date
Elvish_Hunter
7c4e0373ac Removed dependency from obsolete psyco library 2019-10-13 21:54:38 +02:00
Allefant
0d7f227bd2 make wesnoth_addon_manager -l escape newlines 2019-03-07 13:26:12 -05:00
Lovens Weche
75ca522a5b Fix addon manager crash if not finding the add-on (#3874)
* Fix addon manager crash if not finding the add-on

In the addon manager, there was no validation code for paths in the file
system for uploading addons. This fix adds validation at the parsing
level, so that the original code is left unchanged.

* Fixes for addon manager crash commit

Fixes include:

1. Spaces kept instead of tabs.
2. printf-style String Formatting is used since it seems to be compatible
with nearly all versions of Python.
3. A trailing line break was added to the formatted string.
2019-01-18 10:43:51 +11:00
Iris Morelle
391ddd45b2 wam: Add *.ini to upload blacklist to match the engine, reorder a few items
[ci skip]

(cherry-picked from commit 51111db8f7477bfab758d62d9e414405a8494e9c)
2018-10-07 03:18:30 +00:00
V N
f7b31e79c9 addon_manager: allow uploading . dir
fixes GH-2494
2018-02-20 13:41:29 +02:00
vgaming
098b4495bc addon_manager: allow overriding keys (#2491)
[wesnoth_addon_manager] Allow overriding keys in _server.pbl

Example usage:
wesnoth_addon_manager \
	--port 1.13.x \
	--upload ~/.local/share/wesnoth/1.13/data/add-ons/example \
	--pbl-override version "$(git describe --tags)" \
	--pbl-override description "$(cat avoid_copy_paste_with_WML)" \
	--pbl-override passphrase "in countrary to server.pbl, this is secret"

Downsides: user has to be aware that specifying
passwords as CLI arguments is not safe in a multi-user environment.
If we're really-really serious about it, we should parse
values from environment variables then..
I wouldn't bother though.

fixes GH-2485
2018-02-14 20:49:43 +01:00
V N
ae048467ed addon_manager: simplify usage
To remove an add-on, you now have to use:
--remove ADD_ON PASSPHRASE
instead of:
--password 123 --remove NAME

Also, this commit fixes the badly
documented --password field.
It could previously be read as it can be applied
to any operation, not only removal.
But in fact it could only be used for removal.

Fixes GH-2445
2018-02-12 21:00:55 +01:00
V N
0193302847 addon_manager: fix default ign file 2018-02-12 00:11:26 +01:00
Ignacio R. Morelle
cd23596993 wam: Add --datadir option to set the path to the Wesnoth data dir
[ci skip]

This is needed to use the 1.13.x WAM with older versions without messing
up icons due to files that have been moved or deleted over time.
2017-10-10 14:54:08 -03:00
aquileia
809e61db88 Python scripts: Unify encoding magic comments 2016-05-03 22:12:19 +02:00
Elias Pschernig
900c84657b Upgraded wesnoth_addon_manager to Python 3
This includes campaignserver_client.py which is also used by wescamp.py
- however wescamp.py is still Python 2 at this point and will need to be
  upgraded at a later point in time.
2015-09-22 16:33:14 -04:00
Ignacio R. Morelle
d0d95f2f9f wam: Use a tuple for the --change-passphrase argument's metavar
Fixes its help entry looking like this:

>  --change-passphrase ADD-ON OLD NEW ADD-ON OLD NEW ADD-ON OLD NEW
>                        Change the passphrase for ADD-ON from OLD to NEW

When it really should look like this:

>  --change-passphrase ADD-ON OLD NEW
>                        Change the passphrase for ADD-ON from OLD to NEW
2014-06-12 00:27:20 -04:00
Ignacio R. Morelle
80172ee58f wam: Make our _info.cfg's look identical to the C++ client's
To achieve this, add the same leading comment section ("do no edit this
file", etc.) and use the same indentation format as the C++ engine, and
don't use quotes around the uploads attribute value (it's an integer).
2014-02-20 23:44:33 -03:00
Ignacio R. Morelle
baa566161b wam: Write title and type fields to _info.cfg like the C++ client does 2014-02-20 23:40:54 -03:00
Ignacio R. Morelle
dc15ae8d31 wesnoth_addon_manager: Add missing trailing newline to _info.cfg 2014-02-20 23:25:58 -03:00
Elias Pschernig
ae3697d4e8 [wesnoth_addon_manager] Also upload sub-sections from the .pbl. 2014-02-16 23:08:26 +01:00
Elias Pschernig
10df18d7cf [wesnoth_addon_manager] Upload everything in the _server.pbl
There was no reason to filter the list of attributes, anything found in the _server.pbl is now also passed on to the addon server.
2014-02-16 21:12:34 +01:00
Alexander van Gessel
38b224c1ff Revert "Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old""
This reverts commit 23b72d6956e6316f8b50a6accba607f66cf197a7.
2013-08-09 00:13:46 +02:00
Thibault Févry
23b72d6956 Revert "Merge branch 'master' of github.com:wesnoth/wesnoth-old"
This reverts commit 5fa5c034110c3c942d299c8fd440297c89aca037, reversing
changes made to 06374c64ba00977a4f720a44108593fc43d5c787.
2013-08-08 18:50:46 +02:00
Alexander van Gessel
c50aaf8025 Move from optparse to argparse 2013-08-04 22:51:18 +02:00
Alexander van Gessel
f44354a645 Recognize 'trunk' as a wesnoth version rather than a port number 2012-09-09 16:10:46 +01:00
Elias Pschernig
b540995651 [wesnoth_addon_manager] Cache info about addon dependencies...
...from the .pbl file locally (so e.g. wmlunits can use it more easily).
2012-02-19 16:42:49 +00:00
Thibault Févry
c408f32b5f Strip trailing whitespaces.
Some other changes to make code look more pythonish. No important changes.
2011-10-22 00:17:25 +00:00
Elias Pschernig
f57cbe99e0 Added --pbl option to wesnoth_addon_manager as requested by Espreon. 2011-03-31 21:15:05 +00:00
Elias Pschernig
915faaf868 [wesnoth_addon_manager] Allow empty lines in ignore lists. 2011-03-20 21:55:30 +00:00
Thibault Févry
2288ef0939 Removed a lot of trailing whitespaces. Shouldn't be anymore in python scripts. 2011-03-12 02:22:21 +00:00
Alexander van Gessel
ffdecb28a3 Remove references to python validation from wesnoth_addon_manager 2010-11-18 22:20:53 +01:00
Ignacio R. Morelle
4f212d032c Ignore *.wesnoth and *.project files when uploading to add-ons server
This commit adds new default ign patterns to the C++ and Python
implementations of the add-ons upload interface.
2010-10-24 20:25:03 +00:00
Elias Pschernig
41c275cd45 [wesnoth_addon_manager] allow a trailing slash with --upload 2010-07-13 21:06:29 +00:00
Alexander van Gessel
0b31e864b7 Close the connection before processing the data 2010-04-27 14:35:19 +01:00
Elias Pschernig
238bb00d29 possible fix for bug #15846 - _server.ign not quite working 2010-04-11 21:35:25 +00:00
Mark de Wever
5d47584a12 Set the translate flag with the addon script.
patch #1387.
2009-12-07 19:33:57 +00:00
Elias Pschernig
9607325744 [wesnoth_addon_manager] try to connect only once...
...to the server when --html is used in parallel to
--download/--list/--update
2009-10-10 10:12:54 +00:00
Elias Pschernig
3de8e1cd18 [wesnoth_addon_manager] Really remove campaign.
Also remove old-style top-level campaign.cfg.
2009-07-27 14:20:33 +00:00
Elias Pschernig
49fb3688e8 Added support for .ign files to wesnoth_addon_manager 2009-07-08 22:42:01 +00:00
Gunter Labes
322edb0141 fixed the tar command 2009-06-29 16:38:35 +00:00
Gunter Labes
f6fdc4bea0 do not use os.system with user supplied data 2009-05-25 21:32:22 +00:00
Gunter Labes
9d0d04a764 disregard the type option when omitted 2009-03-10 18:03:08 +00:00
Elias Pschernig
a40c7ad98c Added --type options to wesnoth_addon_manager,
...so you can download all addons matching a certain type.
2009-03-07 15:25:20 +00:00
Elias Pschernig
d02db6c4d6 List addon type with wesnot_addon_manager -l. 2009-03-07 15:13:57 +00:00
Gunter Labes
32ea71aaab Revert "use the name from [dir] rather than campaign_name=...
...which might be different from lowercasing" (no more needed after
2009-03-02T02:20:53Z!soliton@wesnoth.org)
2009-03-02 03:26:51 +00:00
Gunter Labes
c0b1df98c2 use the name from [dir] rather than campaign_name=...
...which might be different from lowercasing
2009-03-01 23:50:00 +00:00
Gunter Labes
285ec8c663 Revert "Removed scan for python files when uploading campaigns...
...this only was needed before the routing of python scripts through
safe.py. Also removed the validation mechanism for python scripts - it
never was used as far as I know."
2009-02-24 22:44:30 +00:00
Elias Pschernig
7854e4e61b Fixing previous wesnoth_addon_manager commit. 2009-01-31 15:38:28 +00:00
Elias Pschernig
ad94f556cb Made wesnoth_addon_manager read "type" and "email" fields...
...when uploading a campaign.
2009-01-31 15:33:12 +00:00
Alexander van Gessel
05136ad701 Include oldstyle add-on_name.cfg files in the tarballs. 2008-12-25 03:49:40 +01:00
Elias Pschernig
323cbb2f13 addon_manager: Made tar creation more intelligent. 2008-10-13 20:30:17 +00:00
Elias Pschernig
7211157845 addon_manager:
- Table sorting now displays nice arrows (using the "jquery"
  javascript library for this now).

- Auto-create --tar folder.
2008-10-12 13:05:11 +00:00
Elias Pschernig
cb9c3d2e43 wesnoth_addon_manager: allow --html and --download to be used together 2008-10-09 19:32:18 +00:00
Elias Pschernig
16a9206301 wesnoth_addon_manager: --tar now takes a directory 2008-10-09 19:20:57 +00:00