5802 Commits

Author SHA1 Message Date
Sunil Mohan Adapa
49d554fb0c
doc: wikiparser: Improve links relative to included files
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:21 -04:00
Sunil Mohan Adapa
c522583ecd
doc: wikiparser: Fix some flake8 warnings
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:19 -04:00
Sunil Mohan Adapa
f54e32ae7e
doc: wikiparser: Handle empty table cells
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:16 -04:00
Sunil Mohan Adapa
4448b5baa8
doc: wikiparser: Set icon dimensions to old values (temporarily)
- For easier diff

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:14 -04:00
Sunil Mohan Adapa
feb81b8fb6
doc: wikiparser: Retain the text for icons
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:10 -04:00
Sunil Mohan Adapa
5f947ba1e7
doc: wikiparser: Sort imagedata properties
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:07 -04:00
Sunil Mohan Adapa
cafbdaab19
doc: wikiparser: Place anchors inside paragraphs
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:05 -04:00
Sunil Mohan Adapa
f3dee93a61
doc: wikiparser: Strip spaces from attachment's text
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:03 -04:00
Sunil Mohan Adapa
5aa31266e2
doc: wikiparser: Allow lists to started with just spaces
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:10:00 -04:00
Sunil Mohan Adapa
4fd5d0e73b
doc: wikiparser: Handle wiki links starting with a /
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:58 -04:00
Sunil Mohan Adapa
c7afe8c688
doc: wikiparser: Assign text to URLs that don't provide them
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:55 -04:00
Sunil Mohan Adapa
0bb8dc68fe
doc: wikiparser: Handle existing # in links, don't append again
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:53 -04:00
Sunil Mohan Adapa
d760ee004f
doc: wikiparser: Preserve spaces during parsing and generation
- Matches the original XML more accurately and simplifies some parsing.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:50 -04:00
Sunil Mohan Adapa
aa27037c71
doc: wikiparser: Resolve relative URLs
- Handle links such as DebianBug:, DebianPkg:, AliothList:, attachment:, irc://,
mailto://

- Handle relative links that start with ../

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:48 -04:00
Sunil Mohan Adapa
98ba279850
doc: wikiparser: Fix parsing URLs, simplify plain text parsing
- Parse Wiki words like MoinMoin.

- Handle . : etc. at the end of the links properly.

- Use regular expressions to simplify parsing plain text.

- Strip spaces in link targets and text.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:45 -04:00
Sunil Mohan Adapa
3aca4cd164
doc: wikiparser: Allow empty lines between list items
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:43 -04:00
Sunil Mohan Adapa
9bb518cc76
doc: wikiparser: Parse content inside a comment
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:41 -04:00
Sunil Mohan Adapa
1f94ac4bce
doc: wikiparser: Handle more paragraph breakers
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:38 -04:00
Sunil Mohan Adapa
e5c51e9bb4
doc: wikiparser: Handle table of contents macro without parenthesis
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:36 -04:00
Sunil Mohan Adapa
64fedf1f32
doc: wikiparser: Generate colspec for tables
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:33 -04:00
Sunil Mohan Adapa
e947e99af3
doc: wikiparser: When processing single pages, ignore header/footer
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:30 -04:00
Sunil Mohan Adapa
4ef2244af4
doc: wikiparser: Fix attachment URLs in regular links
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:28 -04:00
Sunil Mohan Adapa
40f853278b
doc: wikiparser: Handle processing instructions
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:25 -04:00
Sunil Mohan Adapa
f628a3ed0b
doc: Recompile when parser script changes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-28 12:09:21 -04:00
James Valleroy
1b55849c02
doc: Add icons used in manual
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-28 12:09:18 -04:00
James Valleroy
5d80ba1262
doc: Use Makefile to fetch raw wiki files
- Fetch all pages included in manual
- Also fetch pages with + in name
- Generate raw xml from raw wiki files
- Don't fetch raw xml for manual pages
- Delete manual raw xml at end of fetch
- Iterate manual pages over raw wiki files instead of raw xml
- Skip remove-footer step for generated manual xml pages

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
[sunil: Don't remove intermediate targets during build]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-28 12:09:08 -04:00
James Valleroy
806db903cf
wikiparser: Fix spaces, multi-line, languages, icons
- Allow for additional languages to be added
- Fix unwanted spaces in paragraphs
- Handle multi-line ListItems
- Handle icons
- Add line break before inline image in list

Based on patches by Fioddor Superconcentrado <fiodor@gmail.com>.

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-28 12:09:05 -04:00
James Valleroy
5b0335a2fa
doc: Add moinmoin wiki parser
- Handle internal links
- Handle includes
- Handle generic categories and includes
- Handle embedded links
- Handle lists
- Handle admonitions and code blocks
- Generate docbook from wiki
- Use argparse
- Generate <itemizedlist> for lists
- Generate docbook article for testing
- Escape content strings
- Create nested <section>s for headings
- Handle links with empty text
- Generate comments as <remark> within <para>
- Add space at end of paragraph
- Ignore Category when generating
- Generate comment for horizontal rule
- Add missing structure to tables
- Don't generate End Include
- Handle Includes
- Handle BEGIN_INCLUDE
- Process begin and end markers when including file
- Handle embedded attachments
- Add a helper script to test all pages
- Generate docbook for admonitions
- Fix include context
- Don't generate for table of contents
- Ignore lines starting with ##
- Ignore space in comparison test
- Use <para> around listitem content
- Wrap code text in <screen>
- Only split plain text for double underscore
- Generate warning for smaller text
- Handle relative links to wiki
- Fix handling of recursive includes
- Parse URLs out of text
- Handle image attachment parameters
- Use SPDX license identifier
- Handle height property for images
- Strip whitespace when using startswith
- Add cols property to tgroup
- Handle spaces at start and end of multi-line CodeText
- Fix page names
- Make consistent in generating <para>s
- Rewrite list handling to support nested lists properly
- Handle embedded attachments inside links
- Handle links within emphasis
- Handle wiki links to InstallingDebianOn/
- Handle line breaks
- Use paragraphs in Admonitions.
- Handle Anchors
- Don't escape code text
- Fix stopping paragraph when list begins
- Fix characters dropped after PlainText
- Fix finding http and https links in text
- Ignore example URLs containing < or >
- Pass context to every call of to_docbook()
- Render CodeText in paragraph as simply <code>
- Ensure only tablestyle is removed from table cells
- Handle line breaks within table cells
- Handle text alignment style within table cell
- Only split plain text for double brace or double bracket
- Ignore lines with only whitespace for paragraphs
- Make tests verbose if no input files givena

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-28 12:08:58 -04:00
James Valleroy
f88ebb7433
locale: Update translation strings
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
2020-08-22 10:25:55 -04:00
Sunil Mohan Adapa
d82f2f5873
radicale: tests: functional: Add test for backup/restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 13:09:35 +05:30
Sunil Mohan Adapa
f43bc8edaf
radicale: Stop service during backup and restore
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 13:09:20 +05:30
Veiko Aasa
eb7454d3b7
gitweb: Fix enable auth webserver component on app init
* Fixes the gitweb app initalization when there are no public
repositories and the apache2 configuration gitweb-freedombox-auth has
not been enabled before (this may happen when the git repositories or
apache2 configuration has been modified outside the plinth web UI).
* Fix comment in the gitweb-freedombox-auth.conf apache2 configuration
file.

Fixes #1928

Tests performed:
* The gitweb app unit and functional tests pass.
* Configured all gitweb repositories as private. Stopped the plinth
service. Disabled the apache2 configuration gitweb-freedombox-auth.
Then starting the plinth service succeeds and gitweb-freedombox-auth
configuration gets enabled.

Signed-off-by: Veiko Aasa <veiko17@disroot.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 12:25:24 +05:30
Sunil Mohan Adapa
699266fdc1
help, networks: Clarify i18n different contexts for "Manual"
The word "Manual" means 'user guide' in case of help and 'not automatically' in
case of networking app.

After change, POT file is produced as follows:

msgctxt "User guide"
msgid "Manual"
msgstr ""

msgctxt "Not automatically"
msgid "Manual"
msgstr ""

Closes: #1922.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 10:52:32 +05:30
Sunil Mohan Adapa
eb567e0f41
diagnostics: Prevent showing running status on diagnostics menu item
Tests:

- Click on diagnostics menu item in any app. Notice that running status does not
show up.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 10:52:32 +05:30
Sunil Mohan Adapa
4a6a936de4
js: Don't show running status on buttons pulled to right
This prevents incorrect animation for running status on first wizard steps.

Tests:

- In the first boot wizard, network topology step, click next and notice that
the running status does not appear next to 'skip wizard' link.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-22 10:52:32 +05:30
Joseph Nuthalapati
4e9d22d376
apps: Remove Coquelicot
Bepasty is the replacement file-sharing app.

Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 15:42:14 -07:00
Joseph Nuthalapati
5971ace116
functional-tests: splinter 0.14.0 is in PyPI
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 11:08:32 -07:00
Sunil Mohan Adapa
3e2df420cf
bepasty: Simplify configuration file handling
- Stick to a subset of allowed configuration file syntax (full syntax). Only KEY
= VALUE statements are allowed. Values can be full JSON (valid python).

- Use augeas to read as key/value pairs and then parse the values in JSON.

- Add convenience methods to read and write configuration files.

- Read the entire configuration file in a single action.

- Internationalize the permission strings displayed to the user.

- Pass password during remove-password operation via stdin instead of command
line.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:49 +05:30
Sunil Mohan Adapa
028137a4e4
bepasty: Require at least one permission on a password
- Since a password without any permissions is not useful.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:30 +05:30
Sunil Mohan Adapa
8194628eb3
bepasty: Update UI strings for permissions
- Make them slightly more verbose. Avoid text in parenthesis.

- 'Web link' is likely more easily associated with URL than 'web address'.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:17 +05:30
Sunil Mohan Adapa
253e30c8e6
bepasty: Add "Snippet" in category/short description
Compared to other apps that do file sharing, sharing snippets that can be viewed
in the browser is a unique distinction of bepasty.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:10 +05:30
Sunil Mohan Adapa
289c033e1b
bepasty: Resize SVG to 512x512 for consistency with other icons
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:42:03 +05:30
Sunil Mohan Adapa
ed5f10437a
bepasty: tests: functional: Add a password before removing all
- Make fixtures more specific to avoid potential clashes with functional BDD
test fixtures of other apps.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:41:53 +05:30
Sunil Mohan Adapa
e03b6041d4
bepasty: Minor fixes
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:41:42 +05:30
Sunil Mohan Adapa
6eed0484ab
bepasty: Add diagnostics tests on app URL
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:41:34 +05:30
Sunil Mohan Adapa
2bbcd2d869
infinoted, syncthing: Fix minor typo in a comment
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:41:22 +05:30
Sunil Mohan Adapa
35a0cdbe3e
bepasty: Tighten permissions on the uwsgi socket
Tested to work alright after wsgi is restarted. Checked permissions on the
socket file /run/uwsgi/app/bepasty-freedombox/socket.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:40:39 +05:30
Sunil Mohan Adapa
06568fe789
bepasty: Expand app description
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:40:27 +05:30
Sunil Mohan Adapa
31d7b0afec
bepasty: Make description a private variable
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Joseph Nuthalapati <njoseph@riseup.net>
2020-08-21 22:40:00 +05:30
James Valleroy
7bd9b61cac
bepasty: Fetch manual page
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
2020-08-21 21:52:52 +05:30