Merge pull request 'Actually added the licence and tidied up README' (#3) from feature-licence-and-better-docs into main

Reviewed-on: #3
This commit is contained in:
bombinans 2025-06-08 09:53:58 +00:00
commit cdc19657a6
2 changed files with 18 additions and 8 deletions

7
LICENSE Normal file
View File

@ -0,0 +1,7 @@
Copyright (c) 2025 Mike Lynch
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -25,17 +25,17 @@ The alt-text is used as the title of each image in the month-level index file. I
The configuration file is JSON as follows: The configuration file is JSON as follows:
``` {
{ "url_re": "^/YOUR_SERVERS_MEDIA_ATTACHMENT_PATH/(.*)$",
"url_re": "^/YOUR_SERVERS_MEDIA_ATTACHMENT_PATH/(.*)$", "title_res": [
"title_res": [ "^(.*?)\\.\\s*(.*)$"
"^(.*?)\\.\\s*(.*)$" ]
] }
}
`url_re` should match the URLs of media attachments in the ActivityPub JSON. This will depend on your server - here's an example from the GLOSSATORY archive. `url_re` should match the URLs of media attachments in the ActivityPub JSON. This will depend on your server - here's an example from the GLOSSATORY archive.
"attachment": "attachment":
[ [
{ {
@ -49,4 +49,7 @@ The configuration file is JSON as follows:
} }
], ],
`title_res` is optional: it's a list of Python regular expressions which will be matched against the alt-text. The text used for the index page is the `()` group or groups from the first regexp which matches. If there's more than one group in the re, the results are joined with spaces.
`title_res` is optional: it's a list of Python regular expressions which will be matched against the alt-text. The text used for the index page is the `()` group or groups from the first regexp which matches. If there's more than one group in the re, the results are joined with spaces.
Comments - questions - issues? let me know at [@mikelynch@aus.social](https://aus.social/@mikelynch)