Output results in table

Discussion in 'Share Experience' started by Support, Sep 22, 2015.

  1. Support

    Support Administrator
    Staff Member A-Parser Enterprise

    Joined:
    Mar 16, 2012
    Messages:
    4,544
    Likes Received:
    2,163
    Everyone knows that A-Parser develop for parsing the information from the Internet in various amounts. Often received data is processed by other scripts or programs. But sometimes there is a need to output collected data in a beautiful form for further visual analysis. And about below.
    Someone for such purposes (and small quantities) using a simple text file, someone outputs to CSV, and then processes the data in Excel, and we also output them as a table on a Web page. We will make a beautiful table, with the possibility of sorting.
    Essentially all problem is reduced to the formation of the resulting file as a Web page. For beauty we use the features of the framework Bootstrap.
    [​IMG]
    As you can see, the task will be to parse some parameters of domains from the file top100.txt and output them into results. And behind a beautiful output we are responsible preppend and append text of resulting file:
    [​IMG]
    [​IMG]
    And of course Result format need to specify the appropriate:
    [​IMG]
    Code:
    eyJwcmVzZXQiOiJQcmV0dHkgcmVzdWx0cyIsInZhbHVlIjp7InByZXNldCI6IlBy
    ZXR0eSByZXN1bHRzIiwicGFyc2VycyI6W1siU0U6Okdvb2dsZTo6UFIiLCJkZWZh
    dWx0Il0sWyJSYW5rOjpBbGV4YSIsImRlZmF1bHQiXSxbIlJhbms6OkFyY2hpdmUi
    LCJkZWZhdWx0Il0sWyJTRTo6R29vZ2xlOjpTYWZlQnJvd3NpbmciLCJkZWZhdWx0
    Il0sWyJSYW5rOjpNdXN0YXQiLCJkZWZhdWx0Il0sWyJSYW5rOjpBaHJlZnMiLCJk
    ZWZhdWx0Il1dLCJyZXN1bHRzRm9ybWF0IjoiPHRyPlxuPHRkPiRxdWVyeTwvdGQ+
    XG48dGQ+JHAxLnByPC90ZD5cbjx0ZD4kcDIucmFuazwvdGQ+XG48dGQ+JHAzLmZp
    cnN0PC90ZD5cbjx0ZD4kcDQuZXhpc3RzPC90ZD5cbjx0ZD4kcDUud29ydGg8L3Rk
    PlxuPHRkPiRwNi50b3RhbDwvdGQ+XG48L3RyPlxuIiwicmVzdWx0c1NhdmVUbyI6
    ImZpbGU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saWduPVwiY2VudGVyXCIgZGF0YS1zb3J0YWJsZT1cInRydWVcIj5XZWJBcmNo
    aXZlX2ZpcnN0PC90aD5cbiAgICAgICAgPHRoIGRhdGEtZmllbGQ9XCJzYWZlYnJv
    d1wiIGRhdGEtYWxpZ249XCJjZW50ZXJcIiBkYXRhLXNvcnRhYmxlPVwidHJ1ZVwi
    PlNhZmVCcm93c2luZzwvdGg+XG4gICAgICAgIDx0aCBkYXRhLWZpZWxkPVwibXVz
    dGF0XCIgZGF0YS1hbGlnbj1cImNlbnRlclwiIGRhdGEtc29ydGFibGU9XCJ0cnVl
    XCI+TXVzdGF0PC90aD5cbiAgICAgICAgPHRoIGRhdGEtZmllbGQ9XCJhaHJlZnNc
    IiBkYXRhLWFsaWduPVwiY2VudGVyXCIgZGF0YS1zb3J0YWJsZT1cInRydWVcIj5B
    aHJlZnM8L3RoPlxuICAgICAgPC90cj5cbiAgICA8L3RoZWFkPlxuICAgIDx0Ym9k
    eT5cbiAgICAiLCJyZXN1bHRzQXBwZW5kIjoiPC90Ym9keT5cbjwvdGFibGU+XG48
    L2Rpdj5cbjwvYm9keT5cbjwvaHRtbD4iLCJxdWVyeUJ1aWxkZXJzIjpbXSwicmVz
    dWx0c0J1aWxkZXJzIjpbXSwiY29uZmlnT3ZlcnJpZGVzIjpbXX19
    As a result we obtain web page, if open that in the browser, we will see a table with the possibility of sorting. See her in the work here.
    [​IMG]
     

Share This Page