├── LICENSE ├── README.md ├── config.php ├── index.html └── screenshot.png /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Gabriel de Jesus 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # phpub2twtxt 2 | 3 | A php interface for publishing microblogposts to your selfhosted [twtxt.txt](https://github.com/buckket/twtxt) 4 | 5 |  6 | 7 | ## Setup and use 8 | 9 | 1. Upload the files to you webserver via ftp 10 | - index.html - the UI for the app 11 | - config.php - the backend that writes to you txt file 12 | - twtxt.txt 13 | 14 | 2. Edit config.php 15 | - add the location of you twtxt.txt file 16 | - you can place the file in and other folder that the files like "../twtxt.txt" to get it in the root of your URL 17 | - default: twtxt.txt 18 | 19 | 3. Navigate to www.yourdomain.net/phpub2twtxt/index.php in you web browser and start microblogging. 20 | 21 | 4. Tell the world to check out you awesome micro blog at www.yourdomain.net/twtxt.txt 22 | 23 | 5. If you want/need to edit or delete you posts then you need to log in via ftp and just edit your text file. 24 | 25 | ## WARNING! 26 | **There is no build-in access control, so whoever know the URL of where you uploade these files will have the power to post as you to your twtxt.txt-file!!!!** 27 | 28 | **Use of this software is totally at one's own risk!!!** 29 | 30 | ## Issues 31 | 32 | * Security / login 33 | - [ ] using access restriction to the folder via cPanel 34 | - [ ] integrat it into yellow cms 35 | - [ ] using some (other) .htaccess or .htpasswd magic 36 | 37 | * Missing line break depending on how the file was left the last time 38 | - [x] add the line break as the first thing 39 | - [ ] check for line breaks at EOF before writing 40 | 41 | 42 | ## Ideas 43 | 44 | * Combine into just one .php file insted of two (UI and backend) 45 | 46 | * Find a better name, such as 47 | - phpost 48 | - picopub 49 | - picopost 50 | - twtpub 51 | - nanopub 52 | 53 | * Make a gif like: https://raw.githubusercontent.com/gabrieldejesus/register-with-txt/master/web-preview.gif 54 | 55 | * Integrate with a nice render of twtxt 56 | - https://github.com/hxii/picoblog 57 | - https://github.com/schulle4u/yellow-extensions-schulle4u/tree/master/ticker 58 | - https://github.com/Zegnat/site-notxte 59 | - https://github.com/my5t3ry/twi 60 | 61 | # Meta 62 | Code based on [register-with-txt by Gabriel de Jesus](https://github.com/gabrieldejesus/register-with-txt) 63 | and bits of php to make it write just one line of twtxt compliant data at a time. 64 | 65 | Distributed under the MIT License. See [LICENSE](LICENSE) for more information. 66 | -------------------------------------------------------------------------------- /config.php: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |An interface for publishing microblogposts to your selfhosted twtxt.txt
71 | 72 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sorenpeter/phpub2twtxt/61dc13afb468f3f20dff948672539898f69ec96c/screenshot.png --------------------------------------------------------------------------------