Package: podping-hivewriter
podping-hivewriterThe Hive writer component of Podping. You will need a Hive account, see sectionHive account and Authorizationbelow.What is Podping?Podping is a mechanism of using decentralized communication to relay notification of updates of RSS feeds that use The Podcast Namespace.  It does so by supplying minimum relevant metadata to consumers to be able to make efficient and actionable decisions, allowing them to decide what to do with given RSS feeds without parsing them ahead of time.Thisproject provides a standardized way of posting a "podping" specifically to the Hive blockcahin.Running podping-hivewriterThe project has two modes of running:writemode andservermode.writemode is primarily useful for people with a very small number of feeds to publish updates for relatively infrequently (i.e. a few times a day or less).servermode is for hosts (or other services like the Podcast Index'spodping.cloud) who publish updates for a significant amount of feeds on a regular basis.  Not that the average small-time podcast can't run it, but it's overkill.  This mode is for efficiency only, as theserverwill batch process feeds as they come in to make the most use of the Hive blockchain.See the dedicatedCLI docsfor more information on configuration options, including environment variables.ContainerThe container images are hosted onDocker Hub.  Images are currently based on Debian bullseye-based PyPy 3.8 with the following architectures:amd64These images can be run in eitherwriteorservermode and is likely the easiest option for users who do not have experience installing Python packages.Command LineRunning inwritemode with command line options, like--dry-runfor example, add them with the full podping command.
Settings can also be passed with the-eoption for Docker.  Note, we leave out-p 9999:9999here because we're not running the server.dockerrun--rm\-ePODPING_HIVE_ACCOUNT=<account>\-ePODPING_HIVE_POSTING_KEY=<posting-key>\docker.io/podcastindexorg/podping-hivewriter\--dry-runwritehttps://www.example.com/feed.xmlRun inservermode, passing local port 9999 to port 9999 in the container.
ENV variables can be passed to docker with--env-fileoption after modifying the.env.EXAMPLEfile and renaming it to.envdockerrun--rm-p9999:9999--env-file.env--namepodpingdocker.io/podcastindexorg/podping-hivewriterAs another example for running inservermode, to run indetachedmode, note the-din thedocker runoptions.  Also note thatwriteorservermust comeafterthe command line options forpodping:dockerrun--rm-d\-p9999:9999--env-file.env\--namepodping\docker.io/podcastindexorg/podping-hivewriter\--livetestserverOne running you can view and follow the live output with:dockerlogspodping-fSee theCLI docsfor default values.docker-composeversion:'2.0'services:podping-hivewriter:image:docker.io/podcastindexorg/podping-hivewriterrestart:alwaysports:-"9999:9999"environment:-PODPING_HIVE_ACCOUNT=<account>-PODPING_HIVE_POSTING_KEY=<posting-key>-PODPING_LISTEN_IP=0.0.0.0-PODPING_LISTEN_PORT=9999-PODPING_LIVETEST=false-PODPING_DRY_RUN=false-PODPING_STATUS=true-PODPING_IGNORE_CONFIG_UPDATES=false-PODPING_I_KNOW_WHAT_IM_DOING=false-PODPING_DEBUG=falseAssuming you just copy-pasted without reading, the above will fail at first.  As noted in theserver command documentation:WARNING: DO NOT run this on a publicly accessible host. There currently is NO authentication required to submit to the server. Set to * or 0.0.0.0 for all interfaces.As all Docker installations vary, we set0.0.0.0as the listen IP for connectivity.  This doesn't affect the IP address docker listens on when we tell it to pass port9999through to the container.  If you understand the consequences of this, setPODPING_I_KNOW_WHAT_IM_DOINGtotrue.This is a temporary measure to limit potential misconfiguration until we fully bundle thepodping.cloudHTTP front end.  Then again, if you're running this, you're probably Dave.CLI InstallThe following have been tested on Linux and macOS.  However, Windows should work also.  If you have issues on Windows we highly recommend theWindows Subsystem for Linuxand/or Docker.Usingpipx(preferred over pip)pipxinstallpodping-hivewriterUsing pippipinstall--userpodping-hivewriterInstalling the serverIf you'd like to install the server component, it's hidden behind the extra flagserver.  This is to make it easier to install only thewriteCLI componentpodping-hivewriteron non-standard systems without a configured development enviornment.pipxinstallpodping-hivewriter[server]Make sure you have~/.local/bin/on yourPATH.See the dedicatedCLI docsfor more information.Podping reasonsPodping accepts various different "reasons" for publishing updates to RSS feeds:update-- A general indication that an RSS feed has been updatedlive-- An indication that an RSS feed has been updated and a contained<podcast:liveItem>tag's status attribute has been changed to live.liveEnd-- An indication that an RSS feed has been updated and either the status attribute of an existing<podcast:liveItem>has been changed from live to ended or a<podcast:liveItem>that previously had a status attribute of live has been removed from the feed entirely.The canonical list of reasons within the scope of this project ismaintained in this schema.MediumsPodping accepts various different "mediums" for identifying types of RSS feeds using the Podcast Namespace.  Please check the<podcast:medium>specification for the full list.podping-hivewritermaylag behind the specification, and if it does, please let us know or submit a pull request.The canonical list of mediums within the scope of this project ismaintained in this schema.DevelopmentYou'll need a few extras:capnproto. Linux:capnprotopackage in your package manager.  On a Mac:brew instal capnpPoetryWe usepoetryfor dependency management.  Once you have it, clone this repo and run:poetryinstallThen to switch to the virtual environment, use:poetryshellMake sure you have a the environment variablesPODPING_HIVE_ACCOUNTandPODPING_HIVE_POSTING_KEYset.After that you should be able to run thepodpingcommand or run the tests:pytestTo run all tests, make sure to set the necessary environment variables for your Hive account.  This will take many minutes:pytest--runslowBuilding the image locally with DockerLocally build the podping-hivewriter container with a "develop" tagdockerbuild-tpodping-hivewriter:develop.See above for more details on running the docker CLI.Hive accountIf you need a Hive account, please download theHive Keychain extension for your browserthen use this link to get your account fromhttps://HiveOnboard.com?ref=podping. You will need at least 20 Hive Power "powered up" to get started (worth around $10). Please contact@brianoflondonbrian@podping.orgif you need assistance getting set up.If you use theHiveonboardlinkpodpingwilldelegateenough Hive Power to get you started. If, for any reason, Hiveonboard is not giving out free accounts, please contact@brianoflondoneither onPodcastIndex SocialorTelegram.Permissions and AuthorizationYou don't need permission, but you do need to tellpodpingthat you want to send validpodpings:Hive is a so-called "permissionless" blockchain.  Once you have a Hive Account and a minimal amount of Hive Power, that account can post to Hive, including sendingpodpings.Nobody can block any valid Hive Account from sending and nobody can help you if you lose your keys.Whilst anyone can postpodpingsto Hive, there is a need to register your Hive Accountname for thosepodpingsto be recognized by all clients.  This is merely a spam-prevention measure and clients may choose to ignore it.Please contactnew@podping.orgor send a Hive Transfer to@podpingto have your account validated.Side note on keys:podpinguses theposting-keywhich is the lowest value of the four Hive keys (owner,active,memo,postingand there is usually amaster passwordwhich can generate all the keys). That is not to say that losing control of it is a good idea, but that key is not authorized to make financially important transfers. It can, however, post public information so should be treated carefully and kept secure.For acomprehensive explanation of Hive and Podping, please see this post.