Giter Site home page Giter Site logo

Comments (4)

michaeldv avatar michaeldv commented on August 18, 2024

Please check out the latest v1.0.1

from awesome_print.

thoraxe avatar thoraxe commented on August 18, 2024

Michael,

It works a little too well! Unfortunately, it dives down a little deep into LDAP schema definitions and other things. I am not sure if that is a function of the way an ActiveLdap object is defined or not. Setting :limit restricts the amount of output, but it appears that ap is trying to parse all of the schema information before outputting anything, so it takes a really long time to get values back. The limit also ends up needing to be rather high to get any of the actual "values" out.

Here's a sample object:

#<LdapUser objectClass:<country, person, organizationalPerson, inetOrgPerson, zarafa-user, top>, must:<c, cn, objectClass, sn>, may:<audio, businessCategory, carLicense, departmentNumber, description, destinationIndicator, displayName, employeeNumber, employeeType, facsimileTelephoneNumber, givenName, homePhone, homePostalAddress, initials, internationaliSDNNumber, jpegPhoto, l, labeledUri, mail, manager, mobile, o, ou, pager, photo, physicalDeliveryOfficeName, postOfficeBox, postalAddress, postalCode, preferredDeliveryMethod, preferredLanguage, registeredAddress, roomNumber, searchGuide, secretary, seeAlso, st, street, telephoneNumber, teletexTerminalIdentifier, telexNumber, title, uid, userCertificate, userPKCS12, userPassword, userSMIMECertificate, x121Address, x500UniqueIdentifier, zarafaAccount, zarafaAdmin, zarafaAliases, zarafaDisabledFeatures, zarafaEnabledFeatures, zarafaHidden, zarafaQuotaHard, zarafaQuotaOverride, zarafaQuotaSoft, zarafaQuotaWarn, zarafaResourceCapacity, zarafaResourceType, zarafaSendAsPrivilege, zarafaSharedStoreOnly, zarafaUserServer>, audio: [], businessCategory: [], c: ["US"], carLicense: [], cn: ["Super Duper"], commonName: ["Super Duper"], countryName: ["US"], departmentNumber: [], description: [], destinationIndicator: [], displayName: [], employeeNumber: [], employeeType: [], facsimileTelephoneNumber: [], fax: [], givenName: ["Super"], homePhone: [], homePostalAddress: [], homeTelephoneNumber: [], initials: [], internationaliSDNNumber: [], jpegPhoto: [], l: ["San Jose"], labeledUri: [], labeledurl: [], locality: ["San Jose"], localityname: ["San Jose"], mail: ["kyletest"], manager: [], mobile: [], mobileTelephoneNumber: [], o: [], objectClass: ["country", "person", "organizationalPerson", "inetOrgPerson", "zarafa-user", "top"], organizationalUnitName: [], organizationname: [], ou: [], pager: [], pagerTelephoneNumber: [], photo: [], physicalDeliveryOfficeName: [], postOfficeBox: [], postalAddress: ["123 Main St"], postalCode: ["95131"], preferredDeliveryMethod: [], preferredLanguage: [], registeredAddress: [], rfc822mailbox: ["[email protected]"], roomNumber: [], searchGuide: [], secretary: [], seeAlso: [], sn: ["Duper"], st: ["CA"], stateOrProvinceName: ["CA"], street: [], streetaddress: [], surName: ["Duper"], telephoneNumber: [], teletexTerminalIdentifier: [], telexNumber: [], title: [], uid: ["kyletest"], userCertificate: [], userPKCS12: [], userPassword: ["{SSHA}"], userSMIMECertificate: [], userid: ["kyletest"], x121Address: [], x500UniqueIdentifier: [], zarafaAccount: [], zarafaAdmin: [], zarafaAliases: [], zarafaDisabledFeatures: ["pop3"], zarafaEnabledFeatures: [], zarafaHidden: [], zarafaQuotaHard: [1048576000], zarafaQuotaOverride: [1], zarafaQuotaSoft: [996147200], zarafaQuotaWarn: [943718400], zarafaResourceCapacity: [], zarafaResourceType: [], zarafaSendAsPrivilege: [], zarafaSharedStoreOnly: [], zarafaUserServer: []>

Sample output is here, because it's 53,652 lines:
http://www.erikjacobs.com/stuff/awesome_print.rb

from awesome_print.

michaeldv avatar michaeldv commented on August 18, 2024

Hi Erik,

Well, your example proves that ap works as designed. ;-) What is it what you would like it to display?

Michael

from awesome_print.

thoraxe avatar thoraxe commented on August 18, 2024

Michael,

I'm not really sure I guess. The difficulty is that AP is parsing down into the definitions of many of the objects contained within the object... if that makes any sense.

If there was an option in AP to only print what is normally shown, but justified and with colors, that might be nice. In other words, if there was a flag like "donotdescend", or something, that would cause AP to print only what is shown above.

Does that make any sense? I'm not sure if it's an edge case or not.

from awesome_print.

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.