Git Product home page Git Product logo

Comments (7)

justquick avatar justquick commented on June 13, 2024

Are you talking about the streams themselves or the actual Atom feeds?

from django-activity-stream.

copiesofcopies avatar copiesofcopies commented on June 13, 2024

I mean the feeds, but I may just be confused. I was looking at the admin user's incoming feed in the example project, and saw that the Atom Activity namespace wasn't specified and no <activity> elements appeared. But again, it's entirely possible that I don't understand the spec and all of this is irrelevant.

from django-activity-stream.

justquick avatar justquick commented on June 13, 2024

i see what you are saying and it sounds like a good idea. it would b stupidly simple to extend the atom feeds to include the activity namespace. my hesitations are that 1) the atom activity spec is just a proposed draft and not a final rfc or anything official 2) would that mean that it could break atom parsers? this seems like a good idea to implement in the future but im open for suggestions/patches/ideas.

from django-activity-stream.

copiesofcopies avatar copiesofcopies commented on June 13, 2024

Compliant Atom parsers should ignore the extra markup: "When unknown foreign markup is encountered in a Text Construct or atom:content element, software SHOULD ignore the markup and process any text content of foreign elements as though the surrounding markup were not present." Your hesitation about implementing a draft spec is reasonable, although presumably any changes won't be so fundamental as to make the work wasted. I'll be taking a look tomorrow night and maybe I'll take a crack at a patch.

from django-activity-stream.

copiesofcopies avatar copiesofcopies commented on June 13, 2024

In order to bring the feeds into compliance, it's going to be define verbs differently, because:

  1. Verbs are associated with URIs, like: http://activitystrea.ms/schema/1.0/post
  2. The verb associated with an action may be subclassed from a (or several) more generic verb(s), and each applicable verb should be displayed in the feed, so that parsers that understand one of the less specific verbs can still parse the entry.

It seems like it will be necessary to define a data structure containing all of the verbs to be used by an application, perhaps using key value pairs of {'URI':'human-readable verb phrase'}. The data structure should also define a hierarchy so that for a given verb entry, it is possible to access parent entries at each level.

from django-activity-stream.

justquick avatar justquick commented on June 13, 2024

It sounds like a good thing to categorize, but I also want people to have individual, custom verbage. Maybe this could be a verb_category (Char/IntField using choices ripped from the activitystream.ms schemas) AND a verb (CharField). That seems do-able and i could help you develop a patch for that. Diving deeper down the rabbit hole, we should also categorize in the same manor Object Types (subjects/actors) defined in section 3.2. This one seems much harder since its generically dealing w/ Django models, but just food for thought.

from django-activity-stream.

copiesofcopies avatar copiesofcopies commented on June 13, 2024

I thought some more about this, and maybe the solution is to make verb an array of dicts of the form: {'verb':'posted a notice', 'verb-type':'http://activitystrea.ms/schema/1.0/post'}. The verb-type could be omitted and default to something sensible (like 'post' or nothing) and the storage & organization of the types could be up to the application.

For object types I was thinking that models could optionally specify a get_object_type method to do the right thing, and otherwise to default to the model's __doc__.

from django-activity-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.