f2ap


Namef2ap JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/Deuchnord/f2ap
SummaryPut your website on the Fediverse thanks to your RSS/Atom feed
upload_time2023-01-06 09:07:26
maintainer
docs_urlNone
authorJérôme Deuchnord
requires_python>=3.9,<4.0
licenseAGPL-3.0-or-later
keywords f2ap activitypub blog rss atom
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ![f2ap](logo.svg)

f2ap (_Feed to ActivityPub_) is a web application that uses the RSS/Atom feed of your website to expose it on the Fediverse
through ActivityPub.

## How to use it

### Prerequisite

The only prerequisite to use f2ap is that your website provides an RSS or Atom feed.
If you don't have one yet, you might want to make it first, as it is a Web standard that allows your visitors to stay in touch with your content with any compatible application. Plus, it is very easy to implement. 

### Installation

#### With PyPI

_**Required:** Python 3.9+_

Install the `f2ap` package:

```bash
pip install f2ap
```

The application will be runnable with the `f2ap` command.
You will need to use a runner like systemd to start it as a service.

#### Docker

_**Required:** Docker_

Grab the image from Docker Hub:

```bash
docker pull deuchnord/f2ap
```

You can get a specific version with the following syntax: `deuchnord/f2ap:<tag>`, where tag is one of the following (`i`, `j` and `k` being numbers):
- `latest`: the last version (default)
- `i`: the last version of the `i` major version
- `i.j`: the last version of the `i.j` minor version
- `i.j.k`: the version `i.j.k`
- `unstable`: the last commit in the Git history.
  It is heavily discouraged to use it in production, as it can have bugs, crash, put fire in your house or, worse, kill your kitten.

##### Docker-Compose

If you want to use f2ap through Docker-Compose, check the [`docker-compose.dist.yml`](docker-compose.dist.yml) for an example of configuration.

### Configuration

To make f2ap work, you will need to write a configuration file that will define its behavior.
It is a boring simple TOML file. You can find a self-documented file in [config.dist.toml](config.dist.toml).
If you run f2ap with Docker, make sure to name it `config.toml` and to place it in the `/data` folder.

### Configuring the server

To provide a better integration to your website, you are encouraged to add some configuration lines to your server.
This will ensure the social applications will correctly discover your website's ActivityPub API.

#### Nginx

Edit your configuration file and add the following lines to your `server` section.
Don't forget to adapt:
- the IP address on the `proxy_pass` lines to match f2ap's configuration;
- the `<username>` part in the last `location` to match the username of your actor.

```nginx
server {
    ## ...
    
    # Propagate the domain name to f2ap
    proxy_set_header Host $host;
    
    # The webfinger allows the social applications to find out that your website serves an ActivityPub API.
    location /.well-known/webfinger {
        proxy_pass http://127.0.0.1:8000;
    }
    
    location / {
        # Match any request asking for an ActivityPub content
        if ( $http_accept ~ .*application/activity\+json.* ) {
            proxy_pass http://127.0.0.1:8000;
        }

        # Match any request sending an ActivityPub content
        if ( $http_content_type = "application/activity+json" ) {
            proxy_pass http://127.0.0.1:8000;
        }
    }
    
    # Exposes the avatar and the header of the profile
    # Change the <username> here with the username of the actor you expose (for instance: blog)
    location ~ /actors/<username>/(avatar|header) {
        proxy_pass http://127.0.0.1:8000;
    }
    
    ## ... 
}
```

### Limitations

Because f2ap uses your RSS/Atom feed to connect your website to ActivityPub, the time before a new entry pops on the Fediverse will depend on the refresh frequency. You might want to choose a frequency that matches your update regularity.
  
**If this behavior is a problem**, f2ap is probably not the right solution for you, and you might need to integrate ActivityPub to your application on your own.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Deuchnord/f2ap",
    "name": "f2ap",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "f2ap,activitypub,blog,rss,atom",
    "author": "J\u00e9r\u00f4me Deuchnord",
    "author_email": "jerome@deuchnord.fr",
    "download_url": "https://files.pythonhosted.org/packages/1f/eb/5939b7fdc0a2776e3918885d219607ac1a15028614b319dd527b87788069/f2ap-0.1.0.tar.gz",
    "platform": null,
    "description": "# ![f2ap](logo.svg)\n\nf2ap (_Feed to ActivityPub_) is a web application that uses the RSS/Atom feed of your website to expose it on the Fediverse\nthrough ActivityPub.\n\n## How to use it\n\n### Prerequisite\n\nThe only prerequisite to use f2ap is that your website provides an RSS or Atom feed.\nIf you don't have one yet, you might want to make it first, as it is a Web standard that allows your visitors to stay in touch with your content with any compatible application. Plus, it is very easy to implement. \n\n### Installation\n\n#### With PyPI\n\n_**Required:** Python 3.9+_\n\nInstall the `f2ap` package:\n\n```bash\npip install f2ap\n```\n\nThe application will be runnable with the `f2ap` command.\nYou will need to use a runner like systemd to start it as a service.\n\n#### Docker\n\n_**Required:** Docker_\n\nGrab the image from Docker Hub:\n\n```bash\ndocker pull deuchnord/f2ap\n```\n\nYou can get a specific version with the following syntax: `deuchnord/f2ap:<tag>`, where tag is one of the following (`i`, `j` and `k` being numbers):\n- `latest`: the last version (default)\n- `i`: the last version of the `i` major version\n- `i.j`: the last version of the `i.j` minor version\n- `i.j.k`: the version `i.j.k`\n- `unstable`: the last commit in the Git history.\n  It is heavily discouraged to use it in production, as it can have bugs, crash, put fire in your house or, worse, kill your kitten.\n\n##### Docker-Compose\n\nIf you want to use f2ap through Docker-Compose, check the [`docker-compose.dist.yml`](docker-compose.dist.yml) for an example of configuration.\n\n### Configuration\n\nTo make f2ap work, you will need to write a configuration file that will define its behavior.\nIt is a boring simple TOML file. You can find a self-documented file in [config.dist.toml](config.dist.toml).\nIf you run f2ap with Docker, make sure to name it `config.toml` and to place it in the `/data` folder.\n\n### Configuring the server\n\nTo provide a better integration to your website, you are encouraged to add some configuration lines to your server.\nThis will ensure the social applications will correctly discover your website's ActivityPub API.\n\n#### Nginx\n\nEdit your configuration file and add the following lines to your `server` section.\nDon't forget to adapt:\n- the IP address on the `proxy_pass` lines to match f2ap's configuration;\n- the `<username>` part in the last `location` to match the username of your actor.\n\n```nginx\nserver {\n    ## ...\n    \n    # Propagate the domain name to f2ap\n    proxy_set_header Host $host;\n    \n    # The webfinger allows the social applications to find out that your website serves an ActivityPub API.\n    location /.well-known/webfinger {\n        proxy_pass http://127.0.0.1:8000;\n    }\n    \n    location / {\n        # Match any request asking for an ActivityPub content\n        if ( $http_accept ~ .*application/activity\\+json.* ) {\n            proxy_pass http://127.0.0.1:8000;\n        }\n\n        # Match any request sending an ActivityPub content\n        if ( $http_content_type = \"application/activity+json\" ) {\n            proxy_pass http://127.0.0.1:8000;\n        }\n    }\n    \n    # Exposes the avatar and the header of the profile\n    # Change the <username> here with the username of the actor you expose (for instance: blog)\n    location ~ /actors/<username>/(avatar|header) {\n        proxy_pass http://127.0.0.1:8000;\n    }\n    \n    ## ... \n}\n```\n\n### Limitations\n\nBecause f2ap uses your RSS/Atom feed to connect your website to ActivityPub, the time before a new entry pops on the Fediverse will depend on the refresh frequency. You might want to choose a frequency that matches your update regularity.\n  \n**If this behavior is a problem**, f2ap is probably not the right solution for you, and you might need to integrate ActivityPub to your application on your own.\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0-or-later",
    "summary": "Put your website on the Fediverse thanks to your RSS/Atom feed",
    "version": "0.1.0",
    "split_keywords": [
        "f2ap",
        "activitypub",
        "blog",
        "rss",
        "atom"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "599aa5800f2c911ce7b5033717d8d482d97e8833000c3c30a40f4e3afb524ed2",
                "md5": "d4ba079ad7afe18cc7d6f4882362f02c",
                "sha256": "4be920fbba96837f26eba7e6315cd042a8abfdb01de1143243cf35fd1519b647"
            },
            "downloads": -1,
            "filename": "f2ap-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d4ba079ad7afe18cc7d6f4882362f02c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 29948,
            "upload_time": "2023-01-06T09:07:25",
            "upload_time_iso_8601": "2023-01-06T09:07:25.479112Z",
            "url": "https://files.pythonhosted.org/packages/59/9a/a5800f2c911ce7b5033717d8d482d97e8833000c3c30a40f4e3afb524ed2/f2ap-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1feb5939b7fdc0a2776e3918885d219607ac1a15028614b319dd527b87788069",
                "md5": "27bb848a44e2f353f5103d154ef18974",
                "sha256": "733ca10f5554c498ff52f28656f8a681adbdf61ad7c65c65706ef225f3925a06"
            },
            "downloads": -1,
            "filename": "f2ap-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "27bb848a44e2f353f5103d154ef18974",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 27864,
            "upload_time": "2023-01-06T09:07:26",
            "upload_time_iso_8601": "2023-01-06T09:07:26.691321Z",
            "url": "https://files.pythonhosted.org/packages/1f/eb/5939b7fdc0a2776e3918885d219607ac1a15028614b319dd527b87788069/f2ap-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-06 09:07:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Deuchnord",
    "github_project": "f2ap",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "f2ap"
}
        
Elapsed time: 0.06714s