├── source.opml ├── docs ├── howsubscriptionworks.md ├── installnode.md ├── userroles.md ├── sourceopml.md ├── signup.md ├── tips.md ├── s3storage.md ├── wordpresslogin.md ├── appscolumn.md ├── sep2025transition.md ├── feb2024transition.md ├── examples │ └── configforhttps.json ├── https.md ├── readinglistupgrade.md ├── setupses.md ├── setup.sql ├── setup.md └── config.md ├── feedland.js ├── package.json ├── emailtemplate.html ├── config.json ├── README.md ├── worknotes.md └── LICENSE /source.opml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scripting/feedlandInstall/main/source.opml -------------------------------------------------------------------------------- /docs/howsubscriptionworks.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scripting/feedlandInstall/main/docs/howsubscriptionworks.md -------------------------------------------------------------------------------- /feedland.js: -------------------------------------------------------------------------------- 1 | const myVersion = "0.4.1", myProductName = "feedlandShell"; 2 | 3 | require ("feedland").start (); 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "feedlandShell", 3 | "version": "0.4.1", 4 | "author": "Dave Winer ", 5 | "license": "GPLV2", 6 | "main": "feedland.js", 7 | "files": [ 8 | ], 9 | "repository": { 10 | "type": "git", 11 | "url": "https://github.com/scripting/feedLandInstall.git" 12 | }, 13 | "dependencies" : { 14 | "feedland": "*" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /emailtemplate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | [%title%] 4 | 5 | 6 | 7 | 8 |
9 |

Click the link below to [%operationToConfirm%].

10 |

[%confirmationUrl%]

11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /docs/installnode.md: -------------------------------------------------------------------------------- 1 | # How to install Node 2 | 3 | I asked chat.openai.com to write this for me. :-) 4 | 5 | ### How to 6 | 7 | To install Node.js, you can download the installer package from the official website and run it on your computer. The installer will guide you through the process of installing Node.js and updating your system path to include the Node.js executable. 8 | 9 | Alternatively, you can install Node.js using a package manager such as apt (on Ubuntu) or brew (on macOS). 10 | 11 | On Ubuntu: 12 | 13 | ``` 14 | 15 | sudo apt-get update 16 | 17 | sudo apt-get install nodejs 18 | 19 | ``` 20 | 21 | On MacOS: 22 | 23 | `brew install node` 24 | 25 | You can check the version of Node.js that you have installed by running the command node -v in your terminal. 26 | 27 | -------------------------------------------------------------------------------- /docs/userroles.md: -------------------------------------------------------------------------------- 1 | # New roles column in the user table 2 | 3 | There's a new column in the users table called roles. 4 | 5 | It defaults to user. If you change it to admin for a user, they will be able to "supervise" any other user on a FeedLand instance, for support and debugging. 6 | 7 | ### How to upgrade 8 | 9 | Create a new column in the users table: 10 | 11 | `alter table users add column role varchar(32) default 'user';` 12 | 13 | There is no user interface at this time for setting the value of a user's role, but you can do it at the command line: 14 | 15 | `update users set role = 'admin' where screenname = 'betsyguernsey';` 16 | 17 | ### Context 18 | 19 | This feature is used to implement Supervisor Mode, where an admin user can see the product from the point of view of another user, to help diagnose a support issue. 20 | 21 | It's patterned after a similar feature in WordPress. 22 | 23 | Docs for using Supervisor Mode will appear elsewhere. 24 | 25 | -------------------------------------------------------------------------------- /docs/sourceopml.md: -------------------------------------------------------------------------------- 1 | # About source.opml 2 | 3 | I write code in an outliner, and it generates the code in this repo from the outline. So what you see as source on GitHub actually isn't what I edit. I couldn't accept a pull request to the generated code. It would just be wiped out the next time I made a change to the outline and re-generated 4 | 5 | So the best thing to do when you spot a mistake is flag it as an issue in the repo, point to the code in question if that's helpful, and I'll thank you and make the fix myself. 6 | 7 | And if you want to add a feature and have it included in this distribution, post an issue and let's talk about it. ;-) 8 | 9 | BTW, if you have an outliner handy, you can read the source the way I wrote it. I always try to include a source.opml file in my projects, as I do here. 10 | 11 | You can read the code in source.opml by clicking this link. 12 | 13 | -------------------------------------------------------------------------------- /docs/signup.md: -------------------------------------------------------------------------------- 1 | # How to sign up to use your instance of FeedLand 2 | 3 | This is the first release of the new mechanism for creating a user account in FeedLand, so it's a good idea to say in one place, how to do that. 4 | 5 | 1. Enter the URL of your FeedLand instance into a browser. You should be greeted by a dialog inviting you to sign in or sign up. Click the Sign up button. 6 | 7 | 2. A dialog appears asking you to enter a name and an email address. Both must be unique. The name must be at least four characters long. The dialog will tell you as you type if the name you've entered is available. When you're ready click the Send button. 8 | 9 | 3. You're prompted to check your email. When you do there should be an email whose subject is "FeedLand confirmation". There's a link in the email. Click it. 10 | 11 | 4. You should be taken back to your FeedLand instance. A dialog asking if you want to subscribe to a few feeds to get started. 12 | 13 | -------------------------------------------------------------------------------- /docs/tips.md: -------------------------------------------------------------------------------- 1 | # Tips 2 | 3 | Random advice for getting started with your own FeedLand installation. 4 | 5 | ### How to restart your server 6 | 7 | If you launched it at the command line, press Control-C on Unix or Cmd-C on a Mac. 8 | 9 | Then, switch into the directory with feedland.js, and launch it with 10 | 11 | `node feedland.js` 12 | 13 | ### How to update when a new version of FeedLand comes out 14 | 15 | Change into the directory containing feedland.js. 16 | 17 | `npm update` 18 | 19 | Quit and restart the server. 20 | 21 | ### Manually setting up a user 22 | 23 | You can create a new user by entering a MySQL command at the command line. 24 | 25 | `insert into users (screenname, emailAddress, emailSecret) values ('bullmancuso', 'bullmancuso@gmail.com', 'getoutahere');` 26 | 27 | On the user's machine, go to the home page of your server, open the JavaScript console and enter. 28 | 29 | `localStorage.emailMemory = "{'emailaddress': 'bullmancuso@gmail.com', 'code': 'getoutahere', 'screenname': "bullmancuso'}";` 30 | 31 | Then go to the feed list for the user. 32 | 33 | `http://yourserver.com/?username=bullmancuso` 34 | 35 | -------------------------------------------------------------------------------- /docs/s3storage.md: -------------------------------------------------------------------------------- 1 | # Using S3 storage 2 | 3 | You can tell FeedLand to store data files on Amazon S3 instead of the local file system. This is necessary in some hosting setups that don't let apps write to the local file system. This is where the config.json settings are explained. 4 | 5 | On the S3 side, here's how you set up a bucket to serve this function for FeedLand. 6 | 7 | 1. Static website hosting must be enabled for the bucket. 8 | 9 | 2. All "Block public access" options must be disabled. 10 | 11 | 3. If you provision a user and credentials for FeedLand (recommended), select "ACLs enabled" under "Object ownership." 12 | 13 | 4. The credentials must be supplied as environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`). 14 | 15 | 5. The credentials you use must have permission to read, list, and write to the S3 bucket. Here is an example policy: 16 | 17 | ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "VisualEditor1", "Effect": "Allow", "Action": "s3:*", "Resource": [ "arn:aws:s3:::bucket-name", "arn:aws:s3:::bucket-name/*" ] } ] } ``` 18 | 19 | Thanks to chriszarate for writing these notes. 20 | 21 | -------------------------------------------------------------------------------- /docs/wordpresslogin.md: -------------------------------------------------------------------------------- 1 | # WordPress login upgrade 2 | 3 | How to set up FeedLand to allow users to login via WordPress Connect. 4 | 5 | ### Create an app on WordPress.com 6 | 7 | Create a new application on wordpress.com. 8 | 9 | It's up to you what the name, description and website url is for the app. 10 | 11 | The "Redirect URL" is essential and must be right or it won't work. 12 | 13 | `https://myfeedland.org/callbackFromWordpress` 14 | 15 | That assumes your server is hosted on myfeedland.org. 16 | 17 | ### Add this to config.json 18 | 19 | ```JSON "wordpress": { "clientId": 12345, "clientSecret": "1234567890123456789012345678901234567890123456789012345678901234", "urlRedirect": "https://myfeedland.org/callbackFromWordpress", "scope": "global" } ``` 20 | 21 | Obviously replace the values for clientId and clientSecret with the ones you got from the WordPress app page. 22 | 23 | ### Making WordPress identity the default 24 | 25 | Set config.flWordPressIdentityDefault to true and restart. 26 | 27 | The buttons on the logon page of your server will now link up to a WordPress identity. 28 | 29 | There is a link in the instructions that you can click to sign up via email as before. 30 | 31 | The commands in the System menu have been updated as well. 32 | 33 | -------------------------------------------------------------------------------- /docs/appscolumn.md: -------------------------------------------------------------------------------- 1 | # What is the apps column in users table for? 2 | 3 | The apps column is a JSON object that we use to store info about the apps we connect with, or any other data an app wants to keep around on a per-user basis. 4 | 5 | ### Background 6 | 7 | There's a shell coming for writing browser-based UIs for FeedLand. I don't want the feedlandHome user interface to be the only way of using FeedLand. 8 | 9 | Every app that builds on FeedLand will need storage, the apps object is for user-level app storage. 10 | 11 | ### Example 12 | 13 | Textcaster is an app I did last spring that turns FeedLand into a linkblog. I use it for the linkblog on Scripting News. 14 | 15 | This is an example of the apps object for each user of Textcaster. 16 | 17 | ```JSON "apps": { "bluesky": { "enabled": true, "siteurl": "https://bsky.social/", "password": "xxx", "mailaddress": "dave.winer@gmail.com" }, "mastodon": { "scopes": "write:statuses+read:accounts", "appname": "feedToMasto", "enabled": true, "siteurl": "https://social.masto.land/", "accesstoken": "xxx" }, "metadata": { "whenStarted": "2023-09-22T12:19:59.035Z" }, "marktwain": { "leadingQuestion": "You're looking well today!", "editorPlaceholderText": "Something interesting goes here." }, "wordpress": { "enabled": true, "siteurl": "https://linkblog3.wordpress.com", "password": "xxx", "username": "scripting" } } ``` 18 | 19 | -------------------------------------------------------------------------------- /docs/sep2025transition.md: -------------------------------------------------------------------------------- 1 | # September 2025 transition 2 | 3 | We add a new metadata column to the items table. 4 | 5 | #### At the MySQL command line 6 | 7 | ```sql 8 | 9 | alter table items add column metadata json not null default (json_object()); 10 | 11 | ``` 12 | 13 | #### In the directory you run FeedLand from 14 | 15 | `npm update` 16 | 17 | #### Notes 18 | 19 |

Version numbers: feedland: v0.7.0, feedlanddatabase: v0.8.2, wpidentity: v0.5.25. 20 | 21 |

The SQL command may take a long time to run, depending on the size of your items table. 22 | 23 |

If you're installing a fresh FeedLand just follow the usual instructions, it automatically creates an items table with a metadata column. (This should be tested too.) 24 | 25 | #### Background 26 | 27 |

The reason this is a more difficult update is that we're adding a column to the items table, metadata, which is a JSON object. 28 | 29 |

It will allow us to add new data to the database without having to go through this again. The rule is, we only put data here that passes through the feedlanddatabase level, data it doesn't need to do its stuff. 30 | 31 |

I'm doing this now because I want to keep two bits of information for every item -- wpSiteId and wpPostId. 32 | 33 |

These values are present for posts that emanate from a WordPress site. They are present in feeds from those sites. We also support this data in the feeds WordLand generates. 34 | 35 |

This data was necessary so the highest levels of the new version WordLand can know if a post coming in through FeedLand came from one of the user's sites. This means we can put an Edit This Page button when we display the item in a twitter-like timeline. 36 | 37 | -------------------------------------------------------------------------------- /docs/feb2024transition.md: -------------------------------------------------------------------------------- 1 | # February 2024 transition 2 | 3 | We added a bunch of stuff to the database tables that FeedLand uses. 4 | 5 | Here we document the steps, in case you're operating a pre-Feb2024 FeedLand install. 6 | 7 | Hopefully this will be the last time we do such a chaotic transition. 8 | 9 | The steps 10 | 11 | 1. Created a new feedland database setup using the original setup.sql. 12 | 13 | 2. Ran the current version of feedland. 14 | 15 | 3. Fixed all the SQL errors because the new columns weren't defined. This required running four bits of code at the command line. 16 | 17 | ```SQL ALTER TABLE items ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE feeds ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0; ALTER TABLE subscriptions ADD COLUMN feedId INT UNSIGNED NOT NULL DEFAULT 0; CREATE INDEX feedId ON items (feedId); ``` 18 | 19 | 4. At that point feedland.js ran reasonably well. There was still one problem, all the feeds had feedId of 0. The feeds table needed to be rearranged a bit. 20 | 21 | 5. I ran this bit of code. 22 | 23 | ```SQL ALTER TABLE feeds ADD COLUMN feedId INT AUTO_INCREMENT PRIMARY KEY, ADD UNIQUE KEY (feedUrl); ``` 24 | 25 | 6. It worked. Now new feeds are getting feedId values that increment with each new feed. 26 | 27 | 7. I then made the changes I made manually to the old version of setup.sql, and that's the new version. 28 | 29 | 8. I deleted setup2.sql. 30 | 31 | 9. We now know that the code and spec for the database are in agreement, and hopefully they will never fall out of sync again. This was some bad practice over here. Mea culpa. 32 | 33 | 10. To be sure we're on solid ground I created a new server following with the new setup and it's still running smoothly in mid-April 2024. 34 | 35 | -------------------------------------------------------------------------------- /docs/examples/configforhttps.json: -------------------------------------------------------------------------------- 1 | { 2 | "whatIsThis": "An example config.json file for a FeedLand installation running under HTTPS, with news products and special feeds enabled.", 3 | 4 | "port": 1452, 5 | 6 | "flWebsocketEnabled": true, 7 | "websocketPort": 1462, 8 | "urlWebsocketServerForClient": "wss://myfeedland.bullhome.com/", 9 | 10 | "myDomain": "myfeedland.bullhome.com", 11 | "urlFeedlandApp": "https://myfeedland.bullhome.com/", 12 | 13 | "mailSender": "bullmancuso@bullhome.com", 14 | "confirmEmailSubject": "bull's feedland confirmation", 15 | 16 | "urlServerForEmail": "https://myfeedland.bullhome.com/", 17 | "urlServerForClient": "https://myfeedland.bullhome.com/", 18 | 19 | "database": { 20 | "host": "mydatabaseprovider.com", 21 | "port": 40303, 22 | "user": "admin", 23 | "password": "xxx", 24 | "charset": "utf8mb4", 25 | "connectionLimit": 100, 26 | "database": "feedland", 27 | "debug": false, 28 | "flLogQueries": false, 29 | "flQueueAllRequests": false 30 | }, 31 | 32 | "flUseTwitterIdentity": false, 33 | "flEnableNewUsers": true, 34 | "flBackupOnStartup": false, 35 | 36 | "flNewsProducts": true, 37 | "flUserFeeds": true, 38 | "flLikesFeeds": true, 39 | 40 | "urlForFeeds": "https://s3.amazonaws.com/bullman/feedland/userfeeds/", 41 | "s3PathForFeeds": "/bullman/feedland/userfeeds/", 42 | "s3LikesPath": "/bullman/feedland/likes/", 43 | "urlNewsProducts": "https://newsprod.bullhome.com/", 44 | 45 | "maxRiverItems": 175, 46 | "maxNewFeedSubscriptions": 250, 47 | 48 | "flUpdateFeedsInBackground": true, 49 | "minSecsBetwFeedChecks": 15, 50 | 51 | "productName": "FeedLand", 52 | "productNameForDisplay": "FeedLand", 53 | 54 | "urlServerHomePageSource": "http://scripting.com/code/feedland/home/index.html", 55 | 56 | "githubBackup": { 57 | "enabled": false, 58 | "username": "mygithubaccount", 59 | "password": "mygithubpassword", 60 | "repo": "feedlandServer", 61 | "basepath": "backups/", 62 | "committer": { 63 | "name": "Jane Doe", 64 | "email": "jane.doe@gmail.com" 65 | }, 66 | "message": "." 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /docs/https.md: -------------------------------------------------------------------------------- 1 | # How to setup HTTPS using Caddy 2 | 3 | 4 | *by Scott Hanson @ScottHansonDE* 5 | 6 | [Caddy](https://caddyserver.com/) is a very easy way to implement HTTPS for node apps. It is a web server that can do 7 | [automatic HTTPS](https://caddyserver.com/docs/automatic-https), automatically provisioning TLS certificates 8 | (from [Let's Encrypt](https://letsencrypt.org/)) for a domain and keeping them renewed. 9 | 10 | ## Assumptions 11 | 12 | - FeedLand is running on an Ubuntu server with DNS is set up for `feedland.example.com` 13 | - `"port": 1452` and `"websocketPort": 1462` in config.json 14 | - `"urlWebsocketServerForClient": "wss://feedland.example.com/"` in config.json 15 | - Ports 80 and 443 are open to the internet 16 | - There is no TLS certificate for `feedland.example.com` 17 | 18 | ## How to 19 | 20 | 1. Install the official Caddy package for Ubuntu [per their instructions](https://caddyserver.com/docs/install#debian-ubuntu-raspbian). This automatically starts and runs Caddy as a systemd service. 21 | 22 | 1. Open the Caddy configuration file in the nano editor with `sudo nano /etc/caddy/Caddyfile` 23 | 24 | 1. Replace the entire contents with: 25 | 26 | ``` 27 | https://feedland.example.com/ { 28 | @websockets { 29 | header Connection *Upgrade* 30 | header Upgrade websocket 31 | } 32 | reverse_proxy @websockets localhost:1462 33 | reverse_proxy localhost:1452 34 | } 35 | ``` 36 | 37 | 1. Restart the Caddy service with `sudo systemctl reload caddy` 38 | 39 | 1. Open `https://feedland.example.com/` in your browser. This first request will take a few seconds for Caddy to request and obtain a certificate from Let's Encrypt. 40 | 41 | ## What this does 42 | 43 | - `http://feedland.example.com/` will redirect to `https://feedland.example.com/` 44 | - The browser will send websocket requests to `wss://feedland.example.com/`, Port 443 by default, which are decrypted and redirected to the app at`localhost:1462` 45 | - `https://feedland.example.com/` is decrypted and redirected to the app at`localhost:1452` 46 | -------------------------------------------------------------------------------- /config.json: -------------------------------------------------------------------------------- 1 | { 2 | "whatIsThis": "A simple example config.json file for a FeedLand installation, with none of the extra features turned on.", 3 | 4 | "port": 1452, 5 | 6 | "flWebsocketEnabled": true, 7 | "websocketPort": 1462, 8 | "urlWebsocketServerForClient": "ws://mydomain.com:1462/", 9 | 10 | "myDomain": "mydomain.com", 11 | "urlFeedlandApp": "http://mydomain.com/", 12 | 13 | "smtpHost": "smtp.mailhost.com", 14 | "smtpPort": 587, 15 | "smtpUsername": "bullman", 16 | "smtpPassword": "getoutahere", 17 | 18 | "mailSender": "bullmancuso@thefamily.org", 19 | "confirmEmailSubject": "FeedLand confirmation", 20 | "confirmationExpiresAfter": 86400, 21 | "urlServerForEmail": "http://mydomain.com/", 22 | "flUseDatabaseForConfirmations": true, 23 | 24 | "database": { 25 | "host": "mydatabaseprovider.com", 26 | "port": 40303, 27 | "user": "admin", 28 | "password": "xxx", 29 | "charset": "utf8mb4", 30 | "connectionLimit": 100, 31 | "database": "feedland", 32 | "debug": false, 33 | "flLogQueries": false, 34 | "flQueueAllRequests": false, 35 | "flUseMySql2": true 36 | }, 37 | 38 | "flUseTwitterIdentity": false, 39 | "flEnableNewUsers": true, 40 | "flBackupOnStartup": false, 41 | 42 | "flNewsProducts": false, 43 | "flUserFeeds": false, 44 | "flLikesFeeds": false, 45 | 46 | "urlForFeeds": "http://data.mydomain.com/feeds/", 47 | "s3PathForFeeds": "/data.mydomain.com/feeds/", 48 | "s3LikesPath": "/data.mydomain.com/likes/", 49 | "urlNewsProducts": "http://newsproducts.mydomain.com", 50 | 51 | "maxRiverItems": 175, 52 | "maxNewFeedSubscriptions": 250, 53 | 54 | "flUpdateFeedsInBackground": true, 55 | "minSecsBetwFeedChecks": 15, 56 | 57 | "productName": "FeedLand", 58 | "productNameForDisplay": "FeedLand", 59 | 60 | "urlServerHomePageSource": "http://scripting.com/code/feedland/home/index.html", 61 | 62 | "flUseRiverCache": true, 63 | "ctSecsLifeRiverCache": 300, 64 | 65 | "githubBackup": { 66 | "enabled": false, 67 | "username": "mygithubaccount", 68 | "password": "mygithubpassword", 69 | "repo": "feedlandServer", 70 | "basepath": "backups/", 71 | "committer": { 72 | "name": "Jane Doe", 73 | "email": "jane.doe@gmail.com" 74 | }, 75 | "message": "." 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /docs/readinglistupgrade.md: -------------------------------------------------------------------------------- 1 | # Reading Lists upgrade 2 | 3 | If you have a FeedLand installation prior to v0.6.0, released on October 14, 2023, you'll need to make some changes to the database before installing the new software. 4 | 5 | There are changes to the subscriptions table, and two new tables, readinglists and readinglistsubscriptions. 6 | 7 | The new software supports Reading Lists, user-level docs to come. 8 | 9 | ### Notes on subscriptions table changes 10 | 11 | We had to change the lengths of listName and feedUrl to create space for adding urlReadingList to the primary key in the subscriptions table. 12 | 13 | This created problems for us, and possibly will for you. Some feedUrl's may not fit in 256 characters. In feedland.org's database, there were only three records, out of tens of thousands. I solved the problem by deleting the subscriptions. Far from an ideal solution, but the other alternative was to reorganize this table and the code that runs it, and the cost for that was too high. I'm still learning about SQL databases, and I apologize if you hit similar problems in this change, if so -- please post a note in this thread. 14 | 15 | ### Database changes 16 | 17 | ```SQL alter table subscriptions modify listName varchar (64); alter table subscriptions modify feedUrl varchar (256); alter table subscriptions add urlReadingList varchar (256) not null default ''; alter table subscriptions drop primary key; alter table subscriptions add primary key (feedUrl, listName, urlReadingList); create table readinglists ( opmlUrl varchar (256), title text, description text, id int auto_increment, whenCreated datetime, whenChecked datetime, ctChecks int default 0, whoFirstSubscribed text, feedUrls json, primary key (opmlUrl), unique (id) ); create table readinglistsubscriptions ( opmlUrl varchar (256), screenname varchar (64), whenCreated datetime, primary key (opmlUrl, screenname) ); ``` 18 | 19 | ### Installing new software 20 | 21 | After making the database changes, install the new versions of feedland and feedlanddatabase with ``npm update`` 22 | 23 | ### Problems, questions, suggestions, kudos 24 | 25 | I started a thread in the Issues section. 26 | 27 | -------------------------------------------------------------------------------- /docs/setupses.md: -------------------------------------------------------------------------------- 1 | # How to setup SES 2 | 3 | I asked chat.openai.com to write this for me. :-) 4 | 5 | ### How to 6 | 7 | * Setting up Amazon SES (Simple Email Service) involves several steps, including creating an AWS account, obtaining SMTP credentials, and configuring your email sending domains and email addresses. Here is a general overview of the process: 8 | 9 | * Create an AWS account: If you don't already have an AWS account, you'll need to create one in order to use Amazon SES. Go to aws.amazon.com and click on "Create a new AWS account." 10 | 11 | * Obtain SMTP credentials: Once you have an AWS account, you'll need to obtain SMTP credentials to use for sending email through Amazon SES. Go to the AWS Management Console, select the "Identity and Access Management (IAM)" service, and create a new IAM user with the "Programmatic access" type of access. 12 | 13 | * Create a new SES email sending domain: In the Amazon SES console, click on "Verified Email Addresses" and then "Verify a New Email Address" to verify the email address that you will be sending email from. 14 | 15 | * Create an SNS topic and subscribe your email address: In the Amazon SNS console, create a new topic, and subscribe your email address to it. 16 | 17 | * Configure your DNS: To configure your DNS, you will need to add a few MX, SPF and DKIM records to your domain's DNS settings. 18 | 19 | * Test sending an email: Once you have completed the above steps, you can test sending an email from your email address to another email address. 20 | 21 | * Please note that some of the specifics of these steps may vary depending on your specific use case and the email sending domain you are using. It's recommended to follow Amazon SES documentation for more detailed instructions. 22 | 23 | ### SES sender address configuration (written by ChatGPT) 24 | 25 | * Choose a sender address 26 | 27 | Use an email address at a domain you own (e.g. `no-reply@yourdomain.com`). 28 | 29 | Do not use `gmail.com` or other third-party addresses as the sender. 30 | 31 | * Verify the sender 32 | 33 | * If sending from a single address: 34 | 35 | - Go to SES / Verified identities / "Create identity" / Email address / Enter and verify your address. 36 | 37 | * If sending from multiple addresses at a domain (recommended): 38 | 39 | - Go to SES / Verified identities / "Create identity" / Domain / Enter your domain name. 40 | 41 | - Enable Easy DKIM (2048-bit recommended). 42 | 43 | - If hosted in Route 53, SES can automatically add the DNS records. 44 | 45 | - Otherwise, manually add the three CNAME records SES provides to your DNS configuration. 46 | 47 | * Check SPF record. In your domain's DNS, ensure there is a TXT record authorizing SES to send mail: `v=spf1 include:amazonses.com ~all` 48 | 49 | * Wait for verification. SES will automatically detect the DNS changes and mark your domain as verified. 50 | 51 | * After completing these steps. You can send mail using any address at your verified domain (e.g. `no-reply@yourdomain.com`) and mail will pass SPF and DKIM checks for improved deliverability. 52 | 53 | ### Note from Dave, 7/11/25 54 | 55 | I've been setting up a new FeedLand server. Using email for login. This is where I hit a wall. 56 | 57 | I was using `dave.winer@gmail.com` as the return address. You can't use gmail.com. 58 | 59 | You have to use a domain you control, and then have to set it up with some special CNAMEs that tell Amazon that you authorized using those domains for this purpose. It basically links your domain to your SES account. 60 | 61 | I added a link to the docs in setup page, so hopefully next time, I will not have to spend most of a day chasing down this problem! 62 | 63 | Now I have to get the websockets working on the new FeedLand install. 64 | 65 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FeedLand server install 2 | 3 | Instructions for setting up a FeedLand server. 4 | 5 | ### About FeedLand 6 | 7 | I've been running a FeedLand server myself since October 2022. 8 | 9 | It was always the plan to let other people run their own FeedLand instances, but first I wanted to be sure the server ran reasonably smoothly, and the UI was stable. 10 | 11 | I think at the beginning of 2023 we've gotten there. 12 | 13 | Hence this package. 14 | 15 | ### How to install 16 | 17 | When you follow the setup instructions you will have a FeedLand instance running on your server. 18 | 19 | You can use it yourself, or share it with others. Or use both models at the same time. 20 | 21 | If you're just using it yourself it does not have to be accessible over the net. 22 | 23 | ### Where's the source code? 24 | 25 | The server software is layered as a stack of Node packages that build on each other. These are the packages Dave Winer wrote and maintains. The top level stuff is GPL2-licensed, the lower level packages are MIT-licensed. 26 | 27 | * feedland -- the top level, the HTTP and websockets interface that connects to the browser-based client. 28 | 29 | * feedlanddatabase -- the code that manages the tables for users, feeds, items, subscriptions, likes. 30 | 31 | * opml -- reading and writing OPML files for subscription lists. 32 | 33 | * reallysimple -- reading RSS, Atom, RDF feeds. 34 | 35 | * daverss -- publishing RSS feeds. 36 | 37 | * daveappserver -- handles the file system, mid-level web server, email, identity. 38 | 39 | * davetwitter -- interfacing with the Twitter API, identity. 40 | 41 | * davegithub -- writing to GitHub repos, for backups. 42 | 43 | * davehttp -- low-level HTTP functionality. 44 | 45 | * davesql -- interfaces to MySQL, queuing. 46 | 47 | * davemail -- sending email. 48 | 49 | * daves3 -- reading and writing to and from Amazon S3. 50 | 51 | ### HTTPS 52 | 53 | If you're using HTTPS, Scott Hanson has written a guide to setting up FeedLand with HTTPS. 54 | 55 | There's a special example config.json derived from a working HTTPS installation. 56 | 57 | ### No pull requests, please 58 | 59 | I can't accept pull requests because I edit the code in an outliner, that's what source.opml is all about. 60 | 61 | So the best thing to do when you spot a mistake is flag it as an issue in the repo, point to the code in question if that's helpful, and I'll thank you and make the fix myself. 62 | 63 | And if you want to add a feature and have it included in this distribution, post an issue and let's talk about it. ;-) 64 | 65 | ### Questions, support 66 | 67 | If your questions are about server installation and setup, post a note in issues section of this repo. 68 | 69 | If you need help with using FeedLand to manage and share feeds, post a note in the FeedLandSupport issues section. 70 | 71 | No matter where you post it, please look to see if your question has been covered in other threads, and please be respectful. 72 | 73 | -------------------------------------------------------------------------------- /docs/setup.sql: -------------------------------------------------------------------------------- 1 | create database feedland character set utf8mb4 collate utf8mb4_unicode_ci; 2 | 3 | use feedland; 4 | 5 | create table feeds ( 6 | feedId int auto_increment primary key, 7 | feedUrl varchar (512) unique, 8 | title text, 9 | htmlUrl text, 10 | description text, 11 | whenCreated datetime, 12 | whenUpdated datetime, 13 | whoFirstSubscribed text, 14 | ctItems int default 0, 15 | ctSubs int default 0, 16 | ctSecs float, 17 | ctErrors int default 0, 18 | ctConsecutiveErrors int default 0, 19 | errorString text, 20 | whenChecked datetime, 21 | ctChecks int default 0, 22 | whenLastError datetime, 23 | urlCloudServer text, 24 | whenLastCloudRenew datetime, 25 | ctCloudRenews int default 0, 26 | copyright text, 27 | generator text, 28 | language text, 29 | twitterAccount text, 30 | managingEditor text, 31 | webMaster text, 32 | pubDate datetime, 33 | lastBuildDate datetime, 34 | docs text, 35 | ttl int, 36 | imageUrl text, 37 | imageTitle text, 38 | imageLink text, 39 | imageWidth int default 0, 40 | imageHeight int default 0, 41 | imageDescription text 42 | ); 43 | 44 | create table items ( 45 | feedUrl varchar (512), 46 | feedId int unsigned not null default 0, 47 | guid varchar (255), 48 | title text, 49 | link text, 50 | description longtext, 51 | pubDate datetime, 52 | enclosureUrl text, 53 | enclosureType text, 54 | enclosureLength int default 0, 55 | id int auto_increment key, 56 | whenCreated datetime, 57 | whenUpdated datetime, 58 | flDeleted boolean, 59 | markdowntext longtext, 60 | outlineJsontext text, 61 | ctLikes int default 0, 62 | likes text, 63 | metadata json not null default (json_object()), 64 | index feedId (feedId) 65 | ); 66 | 67 | create table subscriptions ( 68 | listName varchar (64), 69 | feedUrl varchar (256), 70 | feedId int unsigned not null default 0, 71 | categories varchar (512), 72 | whenUpdated datetime, 73 | urlReadingList varchar (256) not null default '', 74 | primary key (feedUrl, listName, urlReadingList) 75 | ); 76 | 77 | create table users ( 78 | screenname varchar (255), 79 | 80 | ctStartups int default 0, 81 | whenLastStartup datetime, 82 | 83 | whenCreated datetime, 84 | whenUpdated datetime, 85 | 86 | categories text, 87 | homePageCategories text, 88 | newsproductCategoryList text, 89 | 90 | newsproductTitle text, 91 | newsproductDescription text, 92 | newsproductImage text, 93 | newsproductStyle text, 94 | newsproductScript text, 95 | 96 | myFeedTitle text, 97 | myFeedDescription text, 98 | 99 | emailAddress text, 100 | emailSecret text, 101 | 102 | apps json, 103 | 104 | role varchar (32), 105 | 106 | primary key (screenname) 107 | ); 108 | 109 | create table likes ( 110 | listName varchar (255), 111 | itemId int, 112 | emotion int, 113 | whenCreated datetime, 114 | primary key (listName, itemId) 115 | ); 116 | 117 | create table pendingConfirmations ( 118 | magicString varchar (25), 119 | email text, 120 | flDeleted boolean, 121 | screenname text, 122 | flNewUser boolean, 123 | urlRedirect text, 124 | whenCreated datetime, 125 | primary key (magicString) 126 | ); 127 | 128 | create table staticfiles ( 129 | screenname varchar (255), 130 | relpath varchar (255), 131 | type varchar (64), 132 | filecontents text, 133 | flprivate boolean, 134 | whenCreated datetime, 135 | whenUpdated datetime, 136 | ctSaves int default 0, 137 | primary key (screenname, relpath, flprivate) 138 | ); 139 | 140 | create table readinglists ( 141 | opmlUrl varchar (256), 142 | title text, 143 | description text, 144 | id int auto_increment, 145 | whenCreated datetime, 146 | whenChecked datetime, 147 | ctChecks int default 0, 148 | whoFirstSubscribed text, 149 | feedUrls json, 150 | primary key (opmlUrl), 151 | unique (id) 152 | ); 153 | 154 | create table readinglistsubscriptions ( 155 | opmlUrl varchar (256), 156 | screenname varchar (64), 157 | whenCreated datetime, 158 | primary key (opmlUrl, screenname) 159 | ); 160 | 161 | create index itemFeed on items(feedUrl); 162 | create index itemPubDate on items(pubDate); 163 | create index subscriptionsListname on subscriptions(listname); 164 | create index itemDeleted on items(flDeleted); 165 | create index subscriptionsFeedUrl on subscriptions(feedUrl); 166 | create index feedItemIndex on items(flDeleted, pubDate, feedUrl); 167 | create index itemGuidUrl on items(guid, feedUrl); 168 | create index itemsIndex2 on items(flDeleted, pubDate DESC, feedUrl); 169 | -------------------------------------------------------------------------------- /docs/setup.md: -------------------------------------------------------------------------------- 1 | # How to set up a FeedLand instance 2 | 3 | A checklist to set up a new instance. 4 | 5 | ### Requirements 6 | 7 | A server with Node.js installed. 8 | 9 | Access to MySQL either on the local machine or as a service running elsewhere. 10 | 11 | An SMTP mail sender or an Amazon SES account to send email for authentication. 12 | 13 | Amazon S3 for optional features. 14 | 15 | ### Download the folder 16 | 17 | Download the folder from this repo, and copy the files into the folder you want to serve from. 18 | 19 | Note: the only files you actually need for the install are: 20 | 21 | * config.json 22 | 23 | * emailtemplate.html 24 | 25 | * feedland.js 26 | 27 | * package.json 28 | 29 | ### Install the packages 30 | 31 | Launch the terminal app on this system, cd into the directory containing the files and type: 32 | 33 | `npm install` 34 | 35 | It downloads the packages needed to run FeedLand into the node_modules sub-folder. 36 | 37 | ### MySQL setup 38 | 39 | Decide if you want to run your own copy of MySQL or use a service to manage it for you. 40 | 41 | I use Digital Ocean's MySQL service and have been very happy with the cost, performance and reliability of the service. 42 | 43 | You will need to get the following information to add to the database section of config.json. 44 | 45 | * host: The domain name of the machine running MySQL. 46 | 47 | * port: The port it's running on. 48 | 49 | * user: The name of the user associated with the database. 50 | 51 | * password: The user's password. 52 | 53 | * database: The name of the database that will hold FeedLand's info. 54 | 55 | If your MySQL server requires all traffic to be encrypted, add an "ssl" section to the database section of config.json. 56 | 57 | ```JSON 58 | 59 | "ssl": {"rejectUnauthorized": true} 60 | 61 | ``` 62 | 63 | For more info and help, see this thread in the Issues section of this repo. 64 | 65 | ### Create your database 66 | 67 | Open a terminal window to connect to the MySQL database. 68 | 69 | The commands to create the database are in setup.sql. Select the text from that file and paste it into the terminal window. 70 | 71 | ### S3 setup (optional) 72 | 73 | Some features depend on using Amazon S3 to store feeds for users and likes. 74 | 75 | If you want to use those features, set up a place for FeedLand to store the files. 76 | 77 | It can be a separate bucket, or a folder within an existing bucket. 78 | 79 | The location must be accessible via HTTP. 80 | 81 | The config values for S3 storage are: urlForFeeds, s3PathForFeeds, s3LikesPath. 82 | 83 | ### Set up an Amazon SES account (optional) 84 | 85 | We use SES to send mail. At some point we will probably expand the options here. 86 | 87 | Here are some docs that explain how to set up SES. 88 | 89 | Also, you will need to have a credentials.txt to provide access info to the Amazon software. 90 | 91 | ### Set up an SMTP mail server (optional) 92 | 93 | As of 1/24 you can now configure FeedLand to send emails via SMTP, in addition to the previously supported Amazon SES. 94 | 95 | To configure it for SMTP, provide four new values in config.json, smtpHost, smtpPort, smtpUsername and smtpPassword. 96 | 97 | I've included these in the example config.json file and described them in the config.json docs. 98 | 99 | ### Fill in the info in config.json 100 | 101 | I've included a template for config.json, with the pieces you need to fill in to get your FeedLand instance running. 102 | 103 | Open that file in a text editor, in the folder you're running FeedLand. It should be obvious how the data from this page maps onto the entries in config.json, but here are some notes about special cases. 104 | 105 | * If you're running the server locally, say on port 1452, you would set myDomain to "localhost:1452". 106 | 107 | * You should set flWebsocketEnabled true if you want users to get realtime updates. 108 | 109 | * There is a set of steps for using Twitter identity, but we haven't documented them at this time. So unless you know what you're doing re Twitter identity, leave this false. 110 | 111 | * urlForFeeds, s3PathForFeeds, s3LikesPath and urlNewsProducts are for optional features, if you don't want to host feeds for users, or make Likes subscribable, set them to the empty string. 112 | 113 | * If you want to host feeds for each user or for Likes, set flUserFeeds and flLikesFeeds true. 114 | 115 | ### Run the app 116 | 117 | Type this at the command line: 118 | 119 | `node feedland.js` 120 | 121 | To try it out, enter the value for myDomain in config.json into a web browser. That should bring up the FeedLand client, ready for you to sign up or sign in. 122 | 123 | You should then create an account for yourself using the signup process, documented here. This is the same process your users will use to create their own accounts. 124 | 125 | ### Edit emailtemplate.html 126 | 127 | Any time you want to change what's in the emails FeedLand sends on your behalf, just edit the text of this file. 128 | 129 | ### Getting updates 130 | 131 | This is how to install new versions of the FeedLand software. 132 | 133 | Change into the directory containing feedland.js. 134 | 135 | `npm update` 136 | 137 | Quit and restart the server. 138 | 139 | ### Other docs 140 | 141 | If you're using HTTPS, Scott Hanson has written a guide to setting up HTTPS with FeedLand. 142 | 143 | There's a special example config.json derived from a working HTTPS installation. 144 | 145 | -------------------------------------------------------------------------------- /docs/config.md: -------------------------------------------------------------------------------- 1 | # About config.json 2 | 3 | All configuration for FeedLand is done in this file 4 | 5 | ### General notes 6 | 7 | The things you have to set are at the top of the file. As you go down the file, they get more optional. 8 | 9 | ### myDomain 10 | 11 | This is how the server talks about itself. If it's running on a remote machine, use the domain name for the machine. If FeedLand is not running on port 80, include the port. Like this: mydomain.com:1452. 12 | 13 | ### database 14 | 15 | This struct provides all the info FeedLand needs to communicate with your MySQL database. 16 | 17 | ### port 18 | 19 | The port that FeedLand will run on. 20 | 21 | FeedLand also looks for process.env.PORT, and will use that port instead, if it's provided. 22 | 23 | ### flWebsocketEnabled 24 | 25 | FeedLand can use WebSockets to send messages back to the client app, when new items are found, or are updated. 26 | 27 | It defaults to true. 28 | 29 | ### websocketPort 30 | 31 | Ignored if flWebsocketEnabled is false, otherwise it specifies the port that we run WebSockets on. 32 | 33 | ### flEnableNewUsers 34 | 35 | If true, new users will be able to create accounts using email as identity. 36 | 37 | It defaults to false. 38 | 39 | Note that from this point in the file all the defaults should only be changed if you want to change the basic behavior of FeedLand. 40 | 41 | ### maxRiverItems 42 | 43 | When FeedLand generates a "river" structure, this is the maximun number of items it will return. 44 | 45 | Default: 175. 46 | 47 | ### maxNewFeedSubscriptions 48 | 49 | Each user can create this many new feed subscriptions, ie feeds that no one else is subscribed to. 50 | 51 | You can subscribe to as many other feeds as you like. 52 | 53 | Default: 250. 54 | 55 | ### flUpdateFeedsInBackground 56 | 57 | If true, FeedLand will read feeds in the background looking for new items. This is a very basic function, if you turn it off the feed reader won't do very much. 58 | 59 | Default: true. 60 | 61 | ### minSecsBetwFeedChecks 62 | 63 | The number of seconds between checking for feed updates in the background. It chooses a different feed every time, based on which feed has least recently been checked. 64 | 65 | Default: 15. 66 | 67 | ### mailSender, confirmEmailSubject, confirmationExpiresAfter, flUseDatabaseForConfirmations 68 | 69 | These values determine how confirmatioin emails are sent. 70 | 71 | mailSender is the email address of the sender of the emails. 72 | 73 | confirmEmailSubject is the subject for confirmation emails. 74 | 75 | confirmationExpiresAfter is the number of seconds after which email confirmations expire. 86400, the default, is 24 hours. 76 | 77 | flUseDatabaseForConfirmations determines whether we store the pending confirmations in memory or in the database. If you're starting a new installation, you should set this true. It defaults to false, to preserve previous behavior. 78 | 79 | ### urlNewsProducts 80 | 81 | The URL of the news products server you're using. 82 | 83 | ### flNewsProducts 84 | 85 | If true, the server supports news products. In the client the menu item for the user's news product is enabled only if flNewsProducts is true. 86 | 87 | The settings are still there for the categories in the news product even if flNewsProducts is false. 88 | 89 | Default: false. 90 | 91 | ### flUserFeeds 92 | 93 | If true, the server supports user feeds. In the client two menu items are enabled only if flUserFeeds is true. 94 | 95 | * Edit my feed 96 | 97 | * Read user feeds 98 | 99 | The settings for the user's title and description are enabled even if flUserFeeds is false. 100 | 101 | Default: false. 102 | 103 | ### flLikesFeeds 104 | 105 | If true, the server supports feeds for likes, both for individual users and for all users of FeedLand on this server. 106 | 107 | Default: false. 108 | 109 | ### smtpHost, smtpPort, smtpUsername, smtpPassword 110 | 111 | Set these values if you want FeedLand to send confirming emails via SMTP instead of Amazon SES (the default). 112 | 113 | ### urlStarterFeeds 114 | 115 | When a user first signs up with FeedLand, we ask if they want subscribe to a set of starter feeds. 116 | 117 | If you want to provide your own starter list for your users, set the urlStarterFeeds value in your config.json with the URL of your OPML subscription list. 118 | 119 | Default: http://scripting.com/publicfolder/feedland/subscriptionLists/starterfeeds.opml 120 | 121 | ### urlFavicon 122 | 123 | You can customize the favicon of your FeedLand installation by setting urlFavicon in config.json to point to the favicon file you want to use. 124 | 125 | Default: http://scripting.com/favicon.ico 126 | 127 | ### urlServerForClient 128 | 129 | If you want to use HTTPS to serve FeedLand you must set this value in config.json. 130 | 131 | The URL should begin with either // or https:// so that the FeedLand client will be able to call back to your server in accordance with the rules for HTTPS. 132 | 133 | An example, if your value for myDomain is "hello.com", this his how you would define urlServerForClient. 134 | 135 | "urlServerForClient": "https://hello.com/" 136 | 137 | Default: http://mydomain.com/ 138 | 139 | ### urlServerForEmail 140 | 141 | The URL of the server we'll use in emails. It's required if you're using email identity. 142 | 143 | Default: undefined. 144 | 145 | ### flUseTwitterIdentity 146 | 147 | If you want to use Twitter for identity instead of email, set this true. 148 | 149 | "flUseTwitterIdentity": true 150 | 151 | If it's true you also need to specify twitterConsumerKey and twitterConsumerKeySecret in config.json, which you can get from the Twitter developer system. 152 | 153 | Default: false 154 | 155 | ### flUseS3ForStorage, s3PathForStorage 156 | 157 | You can use S3 storage instead of local file system storage, by setting flUseS3ForStorage true in config.json. 158 | 159 | Then s3PathForStorage is the path on S3 that FeedLand should use for storage. As with the file system, there will be publicFiles nad privateFiles sub-directories. 160 | 161 | The publicFiles content can be accessed over the web the same way they would if they were stored locally on the FeedLand server machine. 162 | 163 | The default for flUseS3ForStorage is false. 164 | 165 | Here are some tips for setting things up on the Amazon side of this. 166 | 167 | ### flNightlyBackup 168 | 169 | If true we backup the database at midnight local time to the data sub-folder of the folder containing the FeedLand app. 170 | 171 | The default value for flNightlyBackup is false. 172 | 173 | ### maxGetAllUsers 174 | 175 | The number of users who are returned when database.getAllUsers is called, and for the Recent Users command in the feedlandHome app. 176 | 177 | The default value for maxGetAllUsers is 100. 178 | 179 | ### flUseRiverCache, ctSecsLifeRiverCache 180 | 181 | FeedLand can cache rivers so that every time one is requested, if nothing has changed in the feeds it contains, it can save doing a database rebuild for that river. 182 | 183 | We also age-out cache elements, so they to rebuild every so often even if none of the feeds they contain have updated. 184 | 185 | The default value of flUseRiverCache is true. 186 | 187 | The default value of ctSecsLifeRiverCache is 300 (five minutes). 188 | 189 | ### flRenewSubscriptions 190 | 191 | If true, we renew rssCloud subscriptions every 24 hours. 192 | 193 | If you're running behind a firewall, you should turn this off, the subscription renewal will fail. 194 | 195 | The default value is true. 196 | 197 | ### flStaticFilesInSql 198 | 199 | If true, FeedLand will store static files in an SQL table instead of the local filesystem or S3. 200 | 201 | This setting overrides the other storage-related config settings such as flUseS3ForStorage and s3PathForStorage or publicFilesPath. In other words even if you have it set up to save to S3, we will save to the local table if flStaticFilesInSql is true. It's set up this way so migration from S3 or local files to the database is automatic, if it can't find a file in the table, it'll try to find it in the other storage location, if so it returns that. 202 | 203 | The default value is false. 204 | 205 | ### logMinSecs, logMaxResults 206 | 207 | New feature, 9/27/23. 208 | 209 | FeedLand will log info about SQL queries that take longer than logMinSecs seconds or return more than logMaxResults results. 210 | 211 | Default values are 5 and 1000. 212 | 213 | ### flUseSqlForSockets, minSecsBetwSqlSocketChecks 214 | 215 | New feature, 9/27/23. 216 | 217 | If flUseSqlForSockets is true in addition to sending websocket messages when we find a new feed item, either through scanning or receiving and rssCloud ping, we periodically do an SQL query for new elements in the items table. You would set this true if you're running FeedLand in a multiple-instance environment. 218 | 219 | minSecsBetwSqlSocketChecks determines how often FeedLand will do the SQL query if flUseSqlForSockets is true. 220 | 221 | Default values are false and 5. 222 | 223 | ### flWriteRssFilesLocally, localRssPath 224 | 225 | New feature, 9/27/23. 226 | 227 | If flWriteRssFilesLocally is true, when we write an RSS file, in addition to saving it to a public place we also save it to the system's local disk. 228 | 229 | localRssPath is the path we save it to. This feature has been there since the software was first written, it served as a debugging aid, but there was no way to control the feature, so we added the boolean so you could turn the feature off on systems that don't have local filesystems. 230 | 231 | flWriteRssFilesLocally defaults true for backward compatibility. 232 | 233 | localRssPath defaults to "data/feeds/". 234 | 235 | ### flAllowWordpressIdentity 236 | 237 | New feature, 11/1/23. 238 | 239 | If true, users can create accounts using their WordPress account. 240 | 241 | The default value is true. 242 | 243 | ### legalTags 244 | 245 | New feature, 5/31/25. 246 | 247 | Configures what HTML you allow to pass from a feed into the database. The default is to allow <p> and <br>through. 248 | 249 | Here's an example that sets the legalTags to the styles that WordLand supports. 250 | 251 | -------------------------------------------------------------------------------- /worknotes.md: -------------------------------------------------------------------------------- 1 | #### 10/26/25; 12:21:45 PM by DW 2 | 3 | New version of database software, reading news should be faster on systems with large items tables. 4 | 5 | The upgrade is explained here. Note that you have to create a new index. 6 | 7 | #### 9/5/25; 9:44:10 AM by DW 8 | 9 | See this special docs page for details on the new version of FeedLand, v0.8.0. 10 | 11 | #### 8/10/25; 9:12:39 AM by DW 12 | 13 | Changed the default of config.database.flUseMySql2 to true. Gave it some thought, listened to Chuck's opinion, decided it was worth stepping into the future. It's been running with this package on feedland.com for over a year. 14 | 15 | #### 8/7/25; 1:43:02 PM by DW 16 | 17 | Fixed a mistake in yesterday's update about where flUseMySql2 is. It's part of the database object in config.json. 18 | 19 | I added it to the starter config.json template, with the value of false, which has been the default all along, thus is the safest choice. 20 | 21 | Removed the note I added yesterday in the config.json docs, and included what it said here: 22 | 23 | * If config.database.flUseMySql2 is true, FeedLand will use the mysql2 package. 24 | 25 | There was a discussion of this in the Issues section, and it would be a good place to post a question or comment. 26 | 27 | #### 8/6/25; 11:00:32 AM by DW 28 | 29 | Added docs for config.flUseMySql2. 30 | 31 | #### 7/11/25; 10:54:07 AM by DW 32 | 33 | Added a new section to the SES docs explaining how to set up sender address configuration. 34 | 35 | #### 5/31/25; 6:23:17 PM by DW 36 | 37 | New config setting, legalTags, configures what HTML you allow to pass from a feed into the database. The default is to let through <p> and <br>. 38 | 39 | #### 5/27/24; 12:18:38 PM by DW 40 | 41 | New config settings, `membershipClosedHeadline` and `membershipClosedExplanation` can customize the default messages in the signon dialog in FeedLand. 42 | 43 | They default to the previously hard-coded messages. 44 | 45 | #### 2/25/24; 9:30:54 AM by DW 46 | 47 | TL;DR -- setup.sql has been updated so it now creates a database that's compatible with the current version of the server software. If you need to convert an existing installation to the new software, you'll have to do what I did in the steps below, or you could export subscription lists and start over with a fresh database. 48 | 49 | See this special docs page for a step-by-step account of how to upgrade an existing installation. 50 | 51 | #### 11/14/23; 9:24:15 AM by DW 52 | 53 | Added an index recommended by Scott Hanson. 54 | 55 | `create index itemGuidUrl on items(guid, feedUrl);` 56 | 57 | It took about four minutes to run on feeland.org. 58 | 59 | Also added it to the SQL code used to initialize a fresh FeedLand. 60 | 61 | #### 11/13/23; 11:42:10 AM by DW 62 | 63 | Making WordPress the default identity service. 64 | 65 | #### 11/8/23; 3:43:27 PM by DW 66 | 67 | New versions of feedland, feedlanddatabase, feedhunter, 0.6.16, 0.7.10, 0.4.1, respectively. 68 | 69 | #### 11/5/23; 5:01:57 PM by DW 70 | 71 | Supervisor Mode implemented. 72 | 73 | New versions of feedland, feedlanddatabase, daveappserver, versions 0.6.15, 0.7.9, 0.7.10. 74 | 75 | New column in the user table -- role whose default value is "user", one other recognized value "admin". 76 | 77 | Notes for the update are at userroles.md. 78 | 79 | #### 11/2/23; 9:39:07 AM by DW 80 | 81 | Provided an example for how the apps object works in appscolumn.md. 82 | 83 | #### 11/1/23; 11:05:17 AM by DW 84 | 85 | WordPress login. 86 | 87 | I posted a quick howto at wordpresslogin.md. 88 | 89 | If you want to turn it off, set config.flAllowWordpressIdentity false 90 | 91 | #### 10/17/23; 9:51:53 AM by DW 92 | 93 | Added new index in setup.sql. 94 | 95 | `create index feedItemIndex on items(flDeleted, pubDate, feedUrl);` 96 | 97 | #### 10/14/23; 11:12:38 AM by DW -- v0.6.0 98 | 99 | Instructions to upgrade a FeedLand installation to support reading lists. 100 | 101 | Modified setup.sql to include support for reading lists. 102 | 103 | #### 10/3/23; 3:57:17 PM by DW 104 | 105 | Added two index creation commands to the end of setup.sql. These had been added manually to feedland.org, but not documented here. They improve performance for rivers of lots of feeds like my All category. 106 | 107 | #### 9/21/23; 9:33:02 AM by DW 108 | 109 | Documented new staticfiles in sql feature. 110 | 111 | 1. config.flStaticFilesInSql 112 | 113 | 2. SQL code to create the new staticfiles table. 114 | 115 | 3. Instructions for getting started, with a place to ask questions. 116 | 117 | Removed setup instruction for News Product server config. The feature is built into FeedLand now, no need to install a separate app. 118 | 119 | #### 9/19/23; 11:30:14 AM by DW 120 | 121 | Documented flRenewSubscriptions. It's been there since 10/29/22. There are times you want it off, esp when running behind a firewall, you're asking to renew but you won't pass the test. It accomplishes nothing in that case but wasting resources. 122 | 123 | #### 9/13/23; 10:21:36 AM by DW 124 | 125 | Two new config values, flUseRiverCache, ctSecsLifeRiverCache. 126 | 127 | Added to the config.md page and config.json example. 128 | 129 | #### 8/16/23; 5:15:49 AM by DW 130 | 131 | Previous versions saved pending confirmations in memory and on disk in stats.json. This worked fine where there is one instance of feedland.js, but now we're scaling up so there can be many instances, all working on the same data. This means we have to have the option to store pending confirmations in the database so all instances can work off the same data. 132 | 133 | If you're running a single-instance FeedLand , the defaults are set so that it continues to operate as before. If you want to update to use the database as storage for pending confirmations, this is what you have to do. 134 | 135 | 1. In config.json, add a new setting, flUseDatabaseForConfirmations set to true. 136 | 137 | flUseDatabaseForConfirmations: true, 138 | 139 | 2. In your database, create a new table called pendingConfirmations. 140 | 141 | ```SQL create table pendingConfirmations ( magicString varchar (25), email text, flDeleted boolean, screenname text, flNewUser boolean, urlRedirect text, whenCreated datetime, primary key (magicString) ); ``` 142 | 143 | 3. cd into the directory containing feedland.js and npm install. 144 | 145 | Of course you need to reboot FeedLand to reflect the new setup. 146 | 147 | I have also updated the docs to reflect this new feature. 148 | 149 | Previously confirmations expired after one hour by default. I changed the default to 24 hours. There were complaints that they expired too quickly. It's hard for me to understand what causes the delay, but let's give them a bit more grace. You can of course change this setting. 150 | 151 | confirmationExpiresAfter: 60 * 60 * 24, 152 | 153 | To test, sign off and sign back on. Create a new account. Please report any problems in this thread. 154 | 155 | #### 5/26/23 by DW 156 | 157 | New version, gets the updated prefs system in the database. 158 | 159 | No feature in FeedLand that's waiting for this feature, I added it for another project I'm working on, one which makes it possible to build apps on FeedLand as a platform. 160 | 161 | When you want to install the new version: 162 | 163 | 1. npm update the feedland.js app. 164 | 165 | 2. In MySQL, run this command: alter table users add apps json; 166 | 167 | 3. Relaunch feedland.js. 168 | 169 | #### 4/24/23 by DW 170 | 171 | Site is publicly announced in this Scripting News post. 172 | 173 | #### 3/29/23; 9:44:01 AM by DW 174 | 175 | Add flNightlyBackup to the config.md docs page. 176 | 177 | #### 3/20/23; 12:20:36 PM by DW 178 | 179 | Added urlFeedlandApp to both example config.json files. 180 | 181 | #### 1/30/23; 1:09:27 PM by DW 182 | 183 | Documented new config.json value urlServerForClient. 184 | 185 | #### 1/29/23; 11:08:31 AM by DW 186 | 187 | It's now possible to read the source.opml file for this repo by clicking a link. 188 | 189 | It doesn't work for this site right now because it's still private and the gitSourceReader app needs to read the source.opml file over HTTP. 190 | 191 | #### 1/25/23; 10:09:58 AM by DW 192 | 193 | Documented urlStarterFeeds value in config.json. 194 | 195 | Wrote a doc explaining how to sign up on your own instance. 196 | 197 | #### 1/24/23; 11:42:08 AM by DW 198 | 199 | We now support SMTP email in addition to SES. 200 | 201 | Did a quick review of this site, and will post a note in the Issues section explaining how we start. 202 | 203 | Adding more collaborators to this now-private repo. 204 | 205 | Started this Worknotes file. 206 | 207 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | --------------------------------------------------------------------------------